方式一:
$(document).ready(fucntion){ var div1 = document.getElementById("div1"); alert(div1);}
方式二:
$(function(){ var div1 = document.getElementById("div1"); alert(div1);})