87,902
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title></title>
<script language="javascript" type="text/javascript">
function WriteSomething(){
document.write("这是document.write之后的页面,请再右键查看源文件,看只剩下什么?");
}
</script>
</head>
<body>
这是由事件触发document.write之前的内容,请右键查看源文件<br/>
<input type="button" value="调用document.write" onclick="WriteSomething();" />
</body>
</html>
<body>
<script language="javascript">
function show(a)
{
alert(a);
}
document.write('<input type="button" value="test" onclick="show(2)" />');
</script>
</body>