JQuery操作button整理
时间:2010-07-02 来源:hkebao
JQuery操作button整理
时间:2010-7-2
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=gbk" />
<script src="jquery.js" ></script>
<script type="text/javascript">
$(document).ready(function(){ //这个就是传说的ready
$("#mybutton").html("ok"); //修改button的文本内容
//$("#mybutton").click(function(){
// alert("hit me!!");
//});
$('#mybutton').click(abc);
}
)
function abc(){
alert("hit me");
}
</script>
<title>无标题页</title>
</head>
<body>
<button id="mybutton"></button>
</body>
</html>
相关阅读 更多 +