最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Jquery焦點(diǎn)與失去焦點(diǎn)示例應(yīng)用

 更新時(shí)間:2014年06月10日 15:59:27   作者:  
這篇文章主要介紹了Jquery焦點(diǎn)與失去焦點(diǎn)示例應(yīng)用,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

$(function(){
$("#input").focus(function(){//#input換成你的input的ID
//這里寫(xiě)獲得焦點(diǎn)之后運(yùn)行的代碼。
}).blur(function(){
//$(".scroll-question").css("display","none");
});
})

})

live要1.4才支持,以下ie,firefox都沒(méi)問(wèn)題
復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無(wú)標(biāo)題文檔</title>
<script src="/js/jquery-1.4.4.js"></script>
<script>
$(document).ready(function()
{
$("#nameBefore").dblclick(function()
{
$("#nameBefore").replaceWith("<div id='nameIn'><input type='text' name='nameInVal' id='nameInVal' value='In' /></div>");
}
);
//失去焦點(diǎn)以后
$("#nameInVal").live("blur",function()
{
alert('nameInVal已失去焦點(diǎn)');
}
);
}
);
</script>
</head>
<body>
<form name="testfm" method="post" action="save.php">
<table>
<tr><td>1</td><td><div id='nameBefore'>Before</div></td></tr>
</table>
</form>
</body>
</html>

相關(guān)文章

最新評(píng)論

海淀区| 乃东县| 恭城| 息烽县| 华亭县| 阳原县| 九台市| 堆龙德庆县| 江西省| 华蓥市| 信宜市| 鄂尔多斯市| 湖州市| 武川县| 息烽县| 鲜城| 五峰| 佛坪县| 高州市| 九寨沟县| 博罗县| 天门市| 进贤县| 凯里市| 蓬安县| 察隅县| 九龙坡区| 花莲市| 泰顺县| 五寨县| 黎平县| 泗水县| 托里县| 威海市| 山西省| 措勤县| 安吉县| 高要市| 民县| 许昌县| 新野县|