weixin_慕移动4434633
2016-11-20 22:24
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow(){
var mychar=confirm("Open the window?");
if(mychar==true){
var mywindow=prompt("Please write the website:","http://www.ipsousou.com/");
if(mywindow!=null){
window.open(mywindow,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
}
</script>
</head>
<body>
<input name="button" type="button" onClick="openWindow()" value="新窗口打开网站"/>
</body>
</html>
加入style="cursor:pointer"
<input name="button" type="button" onClick="openWindow()" value="新窗口打开网站" style="cursor:pointer" />
<input name="button" type="button" onClick="openWindow()" value="新窗口打开网站"style="cursor:pointer"/> 最后加一句这个
<input style="cursor:pointer;" name="button" type="button" onClick="openWindow()" value="新窗口打开网站"/>
JavaScript入门篇
739817 学习 · 9566 问题
相似问题