img.htc
-----------------------------------------------------
<attach event="onload" onevent="initz()"/>
<attach event="onclick" onevent="alert('这个边框是用htc定义的')"/>
<script language="javascript">
element.border=10;
</script>img.htm
-----------------------------------------------------
<style>
img {behavior:url(img.htc);}
</style>
<IMG SRC="http://expert.csdn.net/images/csdn.gif" BORDER="0">

解决方案 »

  1.   

    不能用<IMG ....说了是自定义的嘛!
    如<ccc src="fff.gif">
      

  2.   

    I don't quite understand what you means,but try:<html xmlns:fason>
    <style>
    fason\:img{behavior:url(img.htc)}
    </style>
    <body>
    <fason:img>test1</fason:img>
    </body>
    </html>img.htc:
    <public:component>
    <public:attach event="onclick" onevent="a()"/>
    <script language="javascript">
    function a(){alert(element.innerHTML)}
    </script>
    </public:component>
      

  3.   


    楼上的
    是模拟这样的<fason:img src="http://expert.csdn.net/images/jspd_wdzx_sqgg_ad.gif">
    图片可以显示还有模拟script标记,要能执行script脚本