代码
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javescript">
var j = 5;
var l;
if ( j >= 0 && j <= 60 ) {
//console.log( "这是E" );
l = "abcd";
} else if ( j > 60 && j <= 69 ) {
console.log( "这是D" );
} else if ( j > 69 && j <= 78 ) {
console.log( "这是C" );
} else {
console.log( "超神" );
}
</script>
</body>
</html>
又修改了一下代码。但是还是打印不出来。
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javescript">
var j = 5;
if ( j >= 0 && j <= 60 ) {
console.log( "这是E" );
} else if ( j > 60 && j <= 69 ) {
console.log( "这是D" );
} else if ( j > 69 && j <= 78 ) {
console.log( "这是C" );
} else {
console.log( "超神" );
}
</script>
</body>
</html>
原始的代码有两处错误,一是console语句被注释了,二是
type="text/javescript"
这句中的javascript拼错了。