function openWindow(){
var web = prompt('請輸入您要打開的網址:','http://www.xianlaiwan.cn/');
if(web = true){
window.open('http://www.xianlaiwan.cn/','width = 400','height=500','menubar=no','toolbar=no');
}else{
return;
}
}
var web = prompt('請輸入您要打開的網址:','http://www.xianlaiwan.cn/');
if(web = true){
window.open('http://www.xianlaiwan.cn/','width = 400','height=500','menubar=no','toolbar=no');
}else{
return;
}
}
document.getElementById('con')獲取的只是P標簽,返回的是[object HTMLParagraphElement],document.getElementById('con').innerHTML獲取的才是P標簽里的內容,返回的是JavaScript
2015-05-11
function openWindow()
{var open=confirm("是否打開");
if(open==true)
{var web=prompt("請輸入網址","http://www.xianlaiwan.cn/");
if(web!=null) {window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no')}
else
{return;}
}
else
{return;}
}
{var open=confirm("是否打開");
if(open==true)
{var web=prompt("請輸入網址","http://www.xianlaiwan.cn/");
if(web!=null) {window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no')}
else
{return;}
}
else
{return;}
}
function openWindow()
{
var openweb;
openweb=confirm("是否打開");
if(openweb==true)
{
var web;
web=prompt("請輸入網址",'http://www.xianlaiwan.cn/');
if(web!=null)
{window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no')}
}
else
}
else
{
var openweb;
openweb=confirm("是否打開");
if(openweb==true)
{
var web;
web=prompt("請輸入網址",'http://www.xianlaiwan.cn/');
if(web!=null)
{window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no')}
}
else
}
else
<script type="text/javascript">
document.getElementById("con").style.color="red";
document.getElementById("con").style.backgroundColor="#ccc";
document.getElementById("con").style.width="300px";
document.getElementById("con").style.color="red";
document.getElementById("con").style.backgroundColor="#ccc";
document.getElementById("con").style.width="300px";
2015-05-08