已采纳回答 / voledy
<script type="text/javascript"> function openWindow(){ var message=confirm("是否打开新窗口?"); if(message==true){ var web=prompt("请出入网址","http://www.baidu.com"); window.open(web,"_blank","width=400,height=500,menubar=...
2016-03-31
function add(){
var p1 = document.getElementById("p1");
change=prompt("what u want")
if(change=="blue")
{p1.className="two"; }
else if(change=="red")
{p1.className="one";}
else
{ alert("not find") }
var p1 = document.getElementById("p1");
change=prompt("what u want")
if(change=="blue")
{p1.className="two"; }
else if(change=="red")
{p1.className="one";}
else
{ alert("not find") }
2016-03-30
function hidetext()
{
document.getElementById("con").style.display="none";
}
function showtext()
{
document.getElementById("con").style.display="block";
}
{
document.getElementById("con").style.display="none";
}
function showtext()
{
document.getElementById("con").style.display="block";
}
2016-03-30
function hidetext()
{
var mychar = document.getElementById("con").style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con").style.display="block";
}
{
var mychar = document.getElementById("con").style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con").style.display="block";
}
2016-03-30
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
2016-03-30
score =prompt("input ur score") ;
if(score!=null)
{
if(score>=90){ document.write("你很棒!");}
else if(score>=75)
{
document.write("不错吆!");
}
else if(score>=60)
{
document.write("要加油!");
}
else
{
document.write("要努力了!");
}}
else
{alert("r u sb?");}
if(score!=null)
{
if(score>=90){ document.write("你很棒!");}
else if(score>=75)
{
document.write("不错吆!");
}
else if(score>=60)
{
document.write("要加油!");
}
else
{
document.write("要努力了!");
}}
else
{alert("r u sb?");}
2016-03-30
相同 name 的窗口只能创建一个,要想创建多个窗口则 name 不能相同。
2016-03-30