请帮忙,谢谢。

valiant 2000-08-25 12:25:00
此段代码执行不了。请帮忙看看。
<html>
<head>
<title>good</title>
<script language="javascript">
function preview (form)
{
msg("wangyong","displaywindow","toolbar=yes,scrollbar=yes")
msg.document.write(form.storage.value)
}
</script>
</head>
<body>
<form>
<input type="hidden" value="storage"
value="<html><head><title>greeting</title></head><body>">
<comment>隐藏对象在这里</comment>
<input type="button" value="你好"
onclick='this.form.storage.value +="<h1>嗨,你好</h1>" '>
<input type="button" value="我好"
onclick='this.form.storage.value +="<h1>嗨,我好</h1>" '>
<input type="button" value="看看我的问候"
onclick="preview(this.form)">
</form>
</body>
</html>
...全文
100 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
huntout 2000-08-28
  • 打赏
  • 举报
回复
Try it! :)

<html>
<head>
<title>good</title>
<script language="javascript">
function preview (form)
{
var msg = window.open("","","toolbar=yes,scrollbar=yes");
msg.document.write(form.storage.value);
}
</script>
</head>
<body>
<form>
<input type="hidden" name="storage"
value="<html><head><title>greeting</title></head><body>">
<comment>隐藏对象在这里</comment>
<input type="button" value="你好"
onclick='storage.value +="<h1>嗨,你好</h1>" '>
<input type="button" value="我好"
onclick='storage.value +="<h1>嗨,我好</h1>" '>
<input type="button" value="看看我的问候"
onclick="preview(document.forms(0))">
</form>
</body>
</html>
华南虎哥 2000-08-25
  • 打赏
  • 举报
回复
<input type="hidden" value="storage" value="<html><head><title>greeting</title></head><body>">
应该改为:
<input type="hidden" name="storage"
value="<html><head><title>greeting</title></head><body>">
至于MSG 我查一下资料看有什么问题

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧