其实这个代码有什么意义?要关掉串口的话直接点×不就可以,为什么用这个代码?感觉窗口又不会打开,直接就关闭了,没用啊!
2016-08-11
已采纳回答 / 慕慕1251584
//定义"取消设置"的函数function cancell(){ var temp; temp=confirm("是否要取消设置"); if(temp==true){ txt.removeAttribute('style'); }这样应该就行了 removeAttribute('style');上述语句应该是将所有设置初始化的意思
2016-08-11
//先判断有没有输入成绩,再去评分.
function rec(){
var score;
score = prompt("请输入成绩");
if(score!="")
if(score>=90)
{
document.write("你很棒!");
}
//此处省略一万字!
else
{
document.write("要努力了!");
}
else{
document.write("骚年,请输入你的成绩!");
}
}
function rec(){
var score;
score = prompt("请输入成绩");
if(score!="")
if(score>=90)
{
document.write("你很棒!");
}
//此处省略一万字!
else
{
document.write("要努力了!");
}
else{
document.write("骚年,请输入你的成绩!");
}
}
2016-08-11
function Dan(){
var LOL;
LOL=prompt("渣渣,你是什么段位?") ;
if(LOL=="青铜")
{
alert("哈,原来是青铜渣!");//直接弹出来
}
else if(LOL=="白银")
{
document.write("哈,好一条白银狗!");//文字要用“”包起来
}
else if(LOL=="黄金")
{
document.write("哈,好一只黄金鸡!");
}
}
</script>
var LOL;
LOL=prompt("渣渣,你是什么段位?") ;
if(LOL=="青铜")
{
alert("哈,原来是青铜渣!");//直接弹出来
}
else if(LOL=="白银")
{
document.write("哈,好一条白银狗!");//文字要用“”包起来
}
else if(LOL=="黄金")
{
document.write("哈,好一只黄金鸡!");
}
}
</script>
2016-08-11