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

jquery open window return value implementation code_jquery

WBOY
Release: 2016-05-16 18:33:16
Original
1062 people have browsed it
复制代码 代码如下:

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
});
});
})
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template