JQuery vs JavaScript 01

来源:互联网 发布:如何禁止下载软件 编辑:程序博客网 时间:2024/05/22 05:25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>01 jquery</title><script src="jquery-1.11.2.js"></script><script type="text/javascript">//Using javascript, the last method will overload the previous method. Only the last method will be excuted.//window.onload = function(){//alert("Dom has been loaded.");//};//window.onload = function(){//alert("Dom has not been loaded.");//};//Using JQuery, both of the two methods will be excuted. If you have included many js files, there maybe not only one onload funtion in one html, //we can use JQuery to excute all of the onload funtion.$(function(){alert("Dom has been loaded");}); $(function(){alert("Dom has not been loaded");}); </script></head><body></body></html>

0 0
原创粉丝点击