欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JQuery選擇器綁定事件及修改內(nèi)容的方法

 更新時(shí)間:2015年01月23日 09:55:56   投稿:shichen2014  
這篇文章主要介紹了JQuery選擇器綁定事件及修改內(nèi)容的方法,涉及bind()、show()、hide()、html()等方法的使用技巧,需要的朋友可以參考下

本文實(shí)例講述了JQuery選擇器綁定事件及修改內(nèi)容的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:

復(fù)制代碼 代碼如下:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hello World jQuery!</title>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
</head>
<body>
<div id="divMsg">Hello World!</div>
<input id="btnShow" type="button" value="顯示" />
<input id="btnHide" type="button" value="隱藏" /><br />
<input id="btnChange" type="button" value="修改內(nèi)容為Hello World,jb51!" />
<script type="text/javascript" >
$("#btnShow").bind("click", function(event) { $("#divMsg").show();});
$("#btnHide").bind("click", function(event) { $("#divMsg").hide();});
$("#btnChange").bind("click", function(event){ $("#divMsg").html("Hello World, jb51!"); });
</script>
</body>
</html>

更多關(guān)于jquery選擇器相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jquery選擇器用法總結(jié)

希望本文所述對大家的jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論