Home  >  Article  >  Web Front-end  >  jquery open window return value implementation code_jquery

jquery open window return value implementation code_jquery

WBOY
WBOYOriginal
2016-05-16 18:33:161033browse
复制代码 代码如下:

get value:



接下来我们写点JS代码实现这个功能:
复制代码 代码如下:

$(document).ready(function(){
$("#inputname").focus(function(){
//alert('focus');
$("#getvalue").css("display",'block')//显示表格
.addClass('hover')
.find('table tr').dblclick(function(){//双击表格tr
var text=$(this).find("td:eq(0)").text();//获取表格td的第一个的文本值
//alert($text);
$("#getvalue").css('display','none');//隐藏表格
$("#inputname").val(text);//赋值Input
});
});
})
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn