问题是:这个是javascript而不是JSP,两者有天壤之别。
解决方案 »
- 将正则表达式加转义字符转成js可用正则表达式
- 本人新手,问一个比较弱智的问题.谢谢大家了
- 谁用过jeditable"就地编辑"的插件啊?怎么有问题啊?
- 能否让一个层自由地游离于框架?急!!!!
- winxp sp2带来的问题
- 关于自动生成下拉菜单和输入框的问题
- 想做一个动态页面的效果,可是还不知道能用什么技术实现,希望高手可以来看看!!!
- 從子窗體刷新父窗體的最佳辦法?
- 如何限制表单输入的是数字
- 怎样把 001,002, 字符(两组数、两个逗号)转换为stu_id in ('001','002')
- 请教各位大虾:如何取一个月的最后一天(JavaScript )!急求!!!
- window.open的窗口如何最大化?
//这个.closed作者注释为判断窗口是否关闭,可是明显不对,可能手误了,请问应该是什么?
makeNewWindow()
}
这里newWindwo为null,不能写newWindow.closed
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Writeing to Subwindow</title>
<script language="javascript">
var newWindow
function makeNewWindow(){
newWindow=window.open("","","status,height=200,width=300")
}
function subWrite(){ makeNewWindow()
if(newWindow!=null){
newWindow.focus();
var newContent="<html><head><title>A New Dox</title></head>"
newContent +="<body><h1>This deocument is brand new.</h1>"
newContent +="Click the Back button to see original document."
newContent +="</body></html>"
newWindow.document.write(newContent)
newWindow.document.close()
}else alert("打开失败!");
}
</script>
</head><body onLoad="makeNewWindow()">
<form>
<input type="button" value="write to subwindow" onClick="subWrite()">
</form>
</body>
</html>