最新回答 / 慕仔4506488
} else if(score>=0 && score != null && score != "") { document.write("要努力了!");}建议对空数据做处理,避免和0分混在一个分支里面;
2021-03-02
已采纳回答 / 慕妹7343412
score>=60 ? document.write("很棒,成绩及格了。") : score<60 ? document.write("加油,成绩不及格。"): document.write("成绩错误!");
2021-01-28
function openWindow()
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
<script type="text/javascript">
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
2021-01-21
document.write("hello");
document.getElementById("p1").style.color="blue";
document.getElementById("p1").style.color="blue";
2021-01-21
function openWindow(){
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}