已采纳回答 / _Exception
弹出一个提示框 , 内容是 JS代码 , 点确定之后提示框才消失 , 或者是你想查看某个值 是什么的时候 , 你用 alert 把那个值输出来就可以看到了
2015-01-27
已采纳回答 / 康振宁
var herf=prompt("请输入网址:");当在prompt中输入值的时候,就会将值赋值给herf了。直接用herf就i可以了。你代码中 var url=document.getElementById(“herf”) 这句话中的引号是中文的,改成英文半角的
2015-01-27
function openWindon(){
if(confirm("确定打开新窗口吗?")){
var url = prompt("请输入一个网址","http://www.imooc.com/");
window.open( url,"_blank","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400");
}
}
if(confirm("确定打开新窗口吗?")){
var url = prompt("请输入一个网址","http://www.imooc.com/");
window.open( url,"_blank","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400");
}
}