var mymessage=confirm("你有jb吗?") ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
2016-02-28
已采纳回答 / vowless
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" Content="text/html; charset=utf-8" /><title>javascript</title><style type="text/css">body{font-size:12px;}#txt{ height:400px; width:600px; border:#3...
2016-02-28
function openWindow(){
var ask = confirm('开么?');
if(ask == true){
var web = prompt('开哪?(无需http://)');
if (web!=null && web!="")
{
window.open('http://'+web,'_blank')
}
else
{alert('错了吧');}
}else{
alert('好的')
}
}
var ask = confirm('开么?');
if(ask == true){
var web = prompt('开哪?(无需http://)');
if (web!=null && web!="")
{
window.open('http://'+web,'_blank')
}
else
{alert('错了吧');}
}else{
alert('好的')
}
}
function openWindow(){
var ask = confirm('开么?');
if(ask == true){
var web = prompt('开哪?(无需http://)');
if (web!=null && web!="")
{
window.open('http://'+site,'_blank')
}
else
{alert('错了吧');}
}else{
alert('好的')
}
}
var ask = confirm('开么?');
if(ask == true){
var web = prompt('开哪?(无需http://)');
if (web!=null && web!="")
{
window.open('http://'+site,'_blank')
}
else
{alert('错了吧');}
}else{
alert('好的')
}
}
function openWindow(){
var message=confirm("是否打开");
if(message==true){
var myname=prompt("确定打开的网址",'http://www.imooc.com/');
if(myname=='http://www.imooc.com/')
{
window.open('http://www.imooc.com/','_blank','width=400,height=500px,menubar=no,toolbar=no') ;
}
}
}
var message=confirm("是否打开");
if(message==true){
var myname=prompt("确定打开的网址",'http://www.imooc.com/');
if(myname=='http://www.imooc.com/')
{
window.open('http://www.imooc.com/','_blank','width=400,height=500px,menubar=no,toolbar=no') ;
}
}
}