摘要:
1、event.preventDefault():阻止某个事件的发生。如一个链接,点击时一般会跳到所链接的页面,如果想规避掉这个功能,则可以采用这个方法。如: <a href="www.baidu.com">点击百度</a> <script> $(document).read(function(){ $("a").click(function(event){ event.preventDefault(); //效果为当点击以上链接时,页面保持不动。 }) }) </script>2、hide()方法,顾名思 阅读全文
posted @ 2011-06-14 19:37
香飘飘2011
阅读(408)
评论(0)
推荐(0)
摘要:
1、$(function(){ $("#a").click(function(){ //adding your code here });});2、$(document).ready(function(){ $("#a").click(function(){ //adding your code here });});3、window.onload = function(){ $("#a").click(function(){ //adding your code here });}html代码为<input type=&quo 阅读全文
posted @ 2011-06-14 08:44
香飘飘2011
阅读(376)
评论(0)
推荐(0)

浙公网安备 33010602011771号