|          
自定义的属性:在"HTC"文件上,加入<Public:property name="属性名称">,代表自定的属性,可以在主程序
 的标签中使用。见如下代码:
 xmllover.htc
 <public:attach event="oblick" onevent="change1()"/>
 <public:property name="xmllover_property"/>
 <Script language="vbscript">
 function change1()
 style.coloe="red"
 end function
 </script>
 
 xmllover.htm
 <html>
 <head>
 <title>xmllover</title>
 <style>
 h1 {behavior:url(xmllover.htc)}
 </style>
 <script language="vbscript">
 sub p1_onclick()
 alert p1.xmllover_property
 end sub
 </script>
 </head>
 
 </body>
 <h1 id="p1" style="cursor:hand" xmllover=property="我是xmllover我怕谁,这是一个自定义的属性">
 click me
 </h1>
 </body>
 </html>
 |