开发者

I Have Error to open Second Html Page as popup window in first html page?

开发者 https://www.devze.com 2022-12-24 11:20 出处:网络
The following syntax I wrote <input id=\"Button1\" type=\"button\" value=\"Scan\" language=\"javascript\" onclick=\"return Button1_onclick()\" /></td>

The following syntax I wrote

<input id="Button1" type="button" value="Scan" language="javascript" onclick="return Button1_onclick()" /></td>

<script language="javascript" type="text/javascript">

function Button1_onclick() 
{ 
     window.open("win1.html","Window1",
     "menubar=no,width开发者_运维问答=430,height=360,toolbar=no");


} 

</script


For future purpose : don't call your function by "Return".

<input id="Button1" type="button" value="Scan" language="javascript" onclick="Button1_onclick()" /></td>

<script language="javascript" type="text/javascript">

function Button1_onclick() 
{ 
     window.open("win1.html","Window1",
     "menubar=no,width=430,height=360,toolbar=no");


} 

</script>

http://www.w3schools.com/jsref/met_win_open.asp

0

精彩评论

暂无评论...
验证码 换一张
取 消