一个有挑战性的问题,
应该为S2.document.scripts[0].innerHTML="alert('1122223233')"
还是S2.document.all.scripts[0].innerHTML="alert('1122223233')"
还是S2.document.body.scripts[0].innerHTML="alert('1122223233')"
???为什么都不行??
在编辑的时候为什么不能这么写???该怎么解决??
<body>
<script>
function ot()
{
S2.document.body.innerHTML="fff<script>function qc(){document.write('1')}</\script>ssss<br>sss<script>document.write('2')</\script>";
S2.document.scripts[0].innerHTML="alert('1122223233')"
alert(S2.document.scripts[0].innerHTML)
}
</script>
<p>
<iframe width="96%" height="33%" id=edit onload="edit.document.designMode='on'" name="S2" style="border: 0px dotted #000080"></iframe>
<input type="button" value="开始" name="B3" onclick="ot()"> </p>
<p>
应该为S2.document.scripts[0].innerHTML="alert('1122223233')"</p>
<p>
还是S2.document.all.scripts[0].innerHTML="alert('1122223233')"</p>
<p>
还是S2.document.body.scripts[0].innerHTML="alert('1122223233')"</p>
<p>
???为什么都不行??<br>
<br>
<br>
在编辑的时候为什么不能这么写???该怎么解决??<br>
</p>
</body>