已采纳回答 / 慕标3916466
把true的双引号去掉就行了function cancel(){ var message=confirm("确定要取消设置么?") if(message==true){ var pp=document.getElementById("txt"); pp.style.width="600px"; pp.style.height="400px"; pp.style.color="#000"; pp.style.backgroundColor="#f...
2016-02-05
function add(){
var p1 = document.getElementById("p1");
p1.className='one';
}
function modify(){
var p2 = document.getElementById("p2");
p2.className='two';
}
var p1 = document.getElementById("p1");
p1.className='one';
}
function modify(){
var p2 = document.getElementById("p2");
p2.className='two';
}
2016-02-05
看到好多人吐槽弹新窗口次数太多
这个代码跟实现本来就是同步的
代码一旦有变更便立即被打开实现
①打字快点;②先破坏windows.open;
这个代码跟实现本来就是同步的
代码一旦有变更便立即被打开实现
①打字快点;②先破坏windows.open;
2016-02-04
function openWindow(){
var message=confirm("是否打开新窗口?");
if(message==true){
var site=prompt("请输入网址","http://www.imooc.com");
if(site !=null){
window.open(site,'_blank','width=400,height=500,menubar=no,toolbar=no')
}
else{alert("点击退出")}
}
else{alert("点击退出")}
}
var message=confirm("是否打开新窗口?");
if(message==true){
var site=prompt("请输入网址","http://www.imooc.com");
if(site !=null){
window.open(site,'_blank','width=400,height=500,menubar=no,toolbar=no')
}
else{alert("点击退出")}
}
else{alert("点击退出")}
}
function openWindow(){
var message=confirm("是否打开新窗口?");
if(message==true){
var site=prompt("请输入网址","http://www.imooc.com");
if(site !=null){
window.open(message2,'_blank','width=400,height=500,menubar=no,toolbar=no')
}
else{alert("点击退出")}
}
else{alert("点击退出")}
}
var message=confirm("是否打开新窗口?");
if(message==true){
var site=prompt("请输入网址","http://www.imooc.com");
if(site !=null){
window.open(message2,'_blank','width=400,height=500,menubar=no,toolbar=no')
}
else{alert("点击退出")}
}
else{alert("点击退出")}
}