内建Behavior的应用:HomePAge篇 "homepage"用来浏览或改变首页,有三种内建的方法。其一:"ishomepage"会检查指定的网址 ,如果是系统默认的首页,其二:"sethomepage"会将指定的网页,设定成系统默认的首页。 其三:"navigatehomepage",就是常用的"回到首页"。本例介绍第一种方法,其它就不再多讲了 xmllover.htm <html xmlns:ie> <head> <title>xmllover</title> <Script> function check() {str1=my_tag.ishomepage(page1.value); alert(Str1);} </script> </head>
<body> <ie tag1 id="my_tag" style=behavior:url(#default#homepage)"/> <input type="text" id="page1" style="font-size:18" value="其它html文件"> <p> <input type="type="button" value="click me" onclick="check()"> </p> </body> </html>
|