简单htc问题
问题:
为什么这样子这个iframe就是不出现???
a.htc
....................
<PUBLIC:COMPONENT URN="urn:msdn-microsoft-com:workshop" >
<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="Init()"/>
<PUBLIC:ATTACH EVENT="onclick" ONEVENT="Click()" />
<script>
function Click()
{
alert(element.document.all.frmtest.style.display);//这个没问题
//alert(window.frames["frmtest"].style); 为什么这个是undefined???
}
function Init()
{
oDateIframe=element.document.createElement("IFRAME");
oDateIframe.id = "frmtest";
oDateIframe.style.display = "";
element.document.appendChild(oDateIframe);
window.frames["frmtest"].document.write("<h1>dad</h1>");
window.frames["frmtest"].document.close();
}
</script>
</PUBLIC:COMPONENT>
a.htm
.......................
<table border="1" width="100">
<tr style="behavior:url(a.htc)">
<td>aaa</td><td>bbb</td>
</tr>
</table>