if(url!=null)
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
else
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
}
else
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
}
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
else
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
}
else
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
}
已采纳回答 / 二吉
prompt:如果用户单击提示框的取消按钮,则返回 null。如果用户单击确认按钮,则返回输入字段当前显示的文本。所以你的b其实是网址,如果点取消就是null,判断b是否为null即可。代码如下 var b = prompt("请输入网址:","http://www.imooc.com/"); if (b!=null && b!="") { window.open(b,'_blank','width=400,height...
2016-06-22
已采纳回答 / 慕粉3475549
通过getElementById("p2")获取p元素,存入var p2中,p2.className="two"获取 .two样式,点击按钮激发事件
2016-06-22
function rec(){
var score;
score = prompt("what the fuck!!!");
if(score>=90)
{
document.write("你很棒!");
}
else if(score>=75)
{
document.write("不错吆!");
}
else if(score>=60)
{
document.write("要加油!");
}
else
{
document.write("要努力了!");
}
}
var score;
score = prompt("what the fuck!!!");
if(score>=90)
{
document.write("你很棒!");
}
else if(score>=75)
{
document.write("不错吆!");
}
else if(score>=60)
{
document.write("要加油!");
}
else
{
document.write("要努力了!");
}
}
2016-06-22
function rec(){
var score;
score =prompt("告诉我你的月工资");
if(score>=30000)
{
document.write("娶我可好?");
}
else if(score>=20000)
{
document.write("我娶你可好?");
}
else if(score>=10000)
{
document.write("做我男朋友吧!");
}
else
{
document.write("娶我,谁叫你长得帅呢!");
}
}
var score;
score =prompt("告诉我你的月工资");
if(score>=30000)
{
document.write("娶我可好?");
}
else if(score>=20000)
{
document.write("我娶你可好?");
}
else if(score>=10000)
{
document.write("做我男朋友吧!");
}
else
{
document.write("娶我,谁叫你长得帅呢!");
}
}
2016-06-22
function rec(){
var mymessage=confirm("你每月会固定时间痛一次吗?")
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
var mymessage=confirm("你每月会固定时间痛一次吗?")
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
2016-06-22
已采纳回答 / qq_蝶雨相思_0
window.open("my_url","_blank","height=400px,width=400px,location=no,tollbar=no,menubar=no")} }
2016-06-22