function openWindow(){
var mywin=confirm("确定打开默认网址:http://www.imooc.com/");
if(mywin==true)
{
window.open('http://www.imooc.com/','_blank','height=500,wight=400,menubar=no,toolbar=no')
} // 新窗口打开时弹出确认框,是否打开
else
{ document.write("你取消打开默认网址")}
}
var mywin=confirm("确定打开默认网址:http://www.imooc.com/");
if(mywin==true)
{
window.open('http://www.imooc.com/','_blank','height=500,wight=400,menubar=no,toolbar=no')
} // 新窗口打开时弹出确认框,是否打开
else
{ document.write("你取消打开默认网址")}
}
<script type="text/javascript">
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
2016-08-16
var mywin;
function opena()
{
mywin=window.open("http://www.imooc.com","_blank","width=400px,height=300px,top=100px");
}
function closea()
{
mywin.close();
}
function opena()
{
mywin=window.open("http://www.imooc.com","_blank","width=400px,height=300px,top=100px");
}
function closea()
{
mywin.close();
}
2016-08-16
已采纳回答 / stone310
2个地方 1、47,48行 要这么写,px是字符串连接mychar.style.height=30+'px'mychar.style.width=100+'px';2、72行 mychar.removrAttribute("style");拼写错误了,应该是mychar.removeAttribute("style");
2016-08-16
mychar.style.cssText=("color:red;background-color:#ccc;width:300px;")
2016-08-16
最新回答 / qq_爱做梦的女孩醒不来_0380155
对的,写的都差不多,验证一下是否实现要求。 function openWindow() { var confirmMessage; var openurl; confirmMessage=confirm("你确定要打开新窗口吗?"); if(confirmMessage=true) { openurl=prompt("请输入要打开的网址:","http://www.imooc.com/"); wi...
2016-08-16