<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>逻辑或</title>
<script type="text/javascript">
var numa,numb,jq1;
numa=50;
numb=55;
jq1=numa>numb || numa==numb ;
document.write("jq1的值是:"+jq1+"<br>")
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>逻辑或</title> <script type="text/javascript"> var numa,numb,jq1; numa=50; numb=55; jq1=numa>numb||numa==numb; document.write("jq1的值是:"+jq1+"<br>") </script> </head> <body> </body> </html>
估计是你||前后有个空格,你把它删掉试试
运行结果没错,是在我提交代码时,提示我 “认真检查吆,是否输入numa>numb || numa==numb...,再试试!直接进入下一节”, 所以我都不知道哪错了