<input type=button name="myname" value="按我" onclick = "test(this)">
<SCRIPT LANGUAGE=javascript>
<!--
var newwin
function test(obj){
if ( newwin == null )
var newwin = window.open("新建 文本文档.html")
else
newwin.open()
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript>
<!--
var newwin
function test(obj){
if ( newwin == null )
var newwin = window.open("新建 文本文档.html")
else
newwin.open()
}
//-->
</SCRIPT>
<input type=button name="myname" value="123" onclick = "test(this)">
<SCRIPT LANGUAGE=javascript>
<!--
var newwin
function test(obj){
if ( newwin == null )
newwin = window.open("新建 文本文档.html")
else{
open(newwin.location.href)
}
}
//-->
</SCRIPT>
IE6,难道要设置IE的配置?
我在想是不是和IE设定有关系。
<input type=button name="myname" value="123" onclick = "test(this)">
<SCRIPT LANGUAGE=javascript>
<!--
var newwin
function test(obj){
if ( newwin == null )
newwin = window.open("新建 文本文档.html")
else{
try{
newwin.focus()
}
catch(e){
newwin = window.open("新建 文本文档.html")
}
}
}
//-->
</SCRIPT>
每次第2个参数一样就行了,