jquery加载页面的方法

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="button" id="a">点击</input>,且页面需要引用jquery的js文件

posted @ 2011-06-14 08:44  香飘飘2011  阅读(371)  评论(0编辑  收藏  举报