function openWindow(){
if(confirm("打开吗?")){
var confirmUrl = prompt("地址","http://www.imooc.com/");
if(confirmUrl){
window.open(confirmUrl,'width=400,height=500,menubar=no,toolbar=no');
}else{alert("终止打开!");}//300字限制真麻烦
}
else{alert("你居然不想打开!");}
}
if(confirm("打开吗?")){
var confirmUrl = prompt("地址","http://www.imooc.com/");
if(confirmUrl){
window.open(confirmUrl,'width=400,height=500,menubar=no,toolbar=no');
}else{alert("终止打开!");}//300字限制真麻烦
}
else{alert("你居然不想打开!");}
}
显示不是<结果:JavaScript>
而是<JavaScript
结果:[object HTMLParagraphElement]>
0.0
而是<JavaScript
结果:[object HTMLParagraphElement]>
0.0
2015-10-01
function openWindow(){ var newl=confirm('是否打开新网页?') if(newl==true){ var wangzhi=prompt('请输入网址:http://www.imooc.com/') if(wangzhi=="http://www.imooc.com/"){
window.open('http://www.imooc.com/','width=400px,height=500px,menubar=no,toolbar=no')}
else{ null } }else{ null } }打开的窗口为啥不对
window.open('http://www.imooc.com/','width=400px,height=500px,menubar=no,toolbar=no')}
else{ null } }else{ null } }打开的窗口为啥不对
function openWindow(){
if(confirm("?")) {
window.open(prompt("请输入要打开的地址","http://www.imooc.com/"),'width=400,height=500,menubar=no,toolbar=no')
}
if(confirm("?")) {
window.open(prompt("请输入要打开的地址","http://www.imooc.com/"),'width=400,height=500,menubar=no,toolbar=no')
}
function openWindow()
{
var mywin;
mywin=confirm("是否打开?");
if(mywin=true){
my=prompt("请输入要打开网址","http://www.imooc.com");
window.open('http://www.imooc.com','width=400','height=500','menubar=no','toolbar=no');
}else{
null;
}
}
{
var mywin;
mywin=confirm("是否打开?");
if(mywin=true){
my=prompt("请输入要打开网址","http://www.imooc.com");
window.open('http://www.imooc.com','width=400','height=500','menubar=no','toolbar=no');
}else{
null;
}
}
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
document.getElementById("con").style.display="block";
}
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
document.getElementById("con").style.display="block";
}
2015-09-29