不知道那不对
<html>
<head>
<title>
</title>
</head>
<body>
<script>
var h=prompt("你是不是一样的爱我?");
if(h=4){
alert("我就知道是了");
}
if else(h=2){
alert("你干嘛犹豫");
}
if else(h=0){
document.write("你以前不这样的");
}
else{
alert("巧了,我也不爱你");
}
</script>
</body>
</html>
<html>
<head>
<title>
</title>
</head>
<body>
<script>
var h=prompt("你是不是一样的爱我?");
if(h=4){
alert("我就知道是了");
}
if else(h=2){
alert("你干嘛犹豫");
}
if else(h=0){
document.write("你以前不这样的");
}
else{
alert("巧了,我也不爱你");
}
</script>
</body>
</html>
2017-05-27
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<script type="text/javascript">
var h=prompt("你是不是一样的爱我?",0);
if(h==4){
alert("我就知道是了");
}
else if(h==2){
alert("你干嘛犹豫");
}
else if(h==0){
document.write("你以前不这样的");
}
else{
alert("巧了,我也不爱你");
}
</script>
</head>
<body>
</body>
</html>兄弟,错误有点多啊,主要是格式不对,还有楼上说了,然后就是else后的分号你写成中文了。
举报