答案:
function openWindow(){
var flag = confirm("是否打开?");
if(flag == true)
{var myk=prompt( "请输入网址:","http://www.imooc.com/");
if(myk){window.open( "http://www.imooc.com/","_blank","toolbar=no, menubar=no, width=400, height=500");}
else{alert("取消打开新窗口")}}
else{document.write("null")}}
function openWindow(){
var flag = confirm("是否打开?");
if(flag == true)
{var myk=prompt( "请输入网址:","http://www.imooc.com/");
if(myk){window.open( "http://www.imooc.com/","_blank","toolbar=no, menubar=no, width=400, height=500");}
else{alert("取消打开新窗口")}}
else{document.write("null")}}
function openWindow(){
var a=confirm('新窗口是否打开')
if(a){ window.open('http://www.imooc.com/','width=400,height=500,menubar=no,toolbar=no,status=no,scroolbars=no')
}
}
var a=confirm('新窗口是否打开')
if(a){ window.open('http://www.imooc.com/','width=400,height=500,menubar=no,toolbar=no,status=no,scroolbars=no')
}
}
定义"取消设置"的函数function quxiao(){var set=confirm("是否恢复设置"); if(set==true) { var mychar4=document.getElementById("txt");mychar4.style.hight="400px";mychar4.style.width="600px";
mychar4.style.color="black";
mychar4.style.backgroundColor="white";
mychar4.style.display="block"}}
mychar4.style.color="black";
mychar4.style.backgroundColor="white";
mychar4.style.display="block"}}
已采纳回答 / weixin_慕斯5277598
你可以先定义一个变量var score,score=prompt,然后再用if条件语句就可以啦。希望对你有帮助<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>prompt</title> <script type="text/javascript"> functi...
2019-09-19
最新回答 / qq_夫儒何_0
<!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 flag = confi...
2019-09-19