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