源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

各浏览器对link标签onload/onreadystatechange事件支持的差异分析

  • 时间:2022-10-14 00:35 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:各浏览器对link标签onload/onreadystatechange事件支持的差异分析
1,onload事件
[url=http://i3.sinaimg.cn/rny/webface/login/css/login101021_min.css]</HEAD> <BODY> </BODY> </HTML>
IE6/7 : [img]http://files.jb51.net/upload/201104/20110427000813547.png[/img] IE8/9 : [img]http://files.jb51.net/upload/201104/20110427000813571.png[/img] Opera : [img]http://files.jb51.net/upload/201104/20110427000813183.png[/img] 即IE6/7/8/9/Opera都支持onload事件, Firefox/Safari/Chrome不支持。 注:用JS创建link标签再添加到head中,情况如上。 2,onreadystatechange事件 IE6/7/8/9中弹出了两次,其它浏览器均没有弹。说明只有IE支持link元素的onreadystatechange事件。弹出两次分别是readyState为loading,complete状态。可使用readyState来判断载入情况。我们再使用JS动态创建link元素试试,
[url=https://developer.mozilla.org/en/HTML/Element/link]https://developer.mozilla.org/en/HTML/Element/link[/url] [url=http://msdn.microsoft.com/en-us/library/ms535848%28v=VS.85%29.aspx]http://msdn.microsoft.com/en-us/library/ms535848%28v=VS.85%29.aspx[/url] [url=http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-35143001]http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-35143001[/url]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部