这是代码
<html>
<head>
<script language="JavaScript">
<!--
function myFunc() {
var doc = parent.frames[1].document;
doc.open();
doc.write(<html><body class="dialogBody"><form><table width="100%"><tr class="colHeader" width="100%"><td align=left valign=middle> </td><td height=20px align=left valign=middle>Cell2</td></tr><tr class=normalRow><td width=20 height=20px align=left valign=middle><input type=radio height=12px width=12px align =center vlign=middle name='select' value=0/></td><td height=20px align=left valign=middle>Ed</td></tr><tr class=altRow><td width=20 height=20px align=left valign=middle><input type=radio height=12px width=12px align =center vlign=middle name='select' value=1/></td><td height=20px align=left valign=middle>Ed2</td></tr></table></form></body></html>);
doc.close();
}
var topFrame = "<a href='#' " +"onClick='parent.myFunc()'>Click me</a>";
var botFrame = "";
myFunc();
//-->
</script>
</head>
<frameset rows="50%,*">
<frame src="javascript:parent.topFrame"><input type="button" value="Click me!" onclick="myFunc()" /></frame>
<frame src="javascript:parent.botFrame">
</frameset>
</html>
使用 Safari 或 firefox 加载此代码时显示空白。你能猜到为什么吗?