W3CAPI 实例工具箱
运行代码
源代码
<!DOCTYPE html> <head> <meta charset="utf-8" /> <title>js 示例</title> </head> <body> <script type="text/javascript"> function marksgrade() { if (document.form1.text1.value >=90) alert('Grade A+'); else if (document.form1.text1.value >=80 && document.form1.text1.value <90) { alert('Grade A'); } else if (document.form1.text1.value >=70 && document.form1.text1.value <80) { alert('Grade B+'); } else if (document.form1.text1.value >=60 && document.form1.text1.value <70) { alert('Grade B'); } else alert('Grade C'); } </script> </body> </html>
运行结果
友情提示
您正在使用的浏览器为IE浏览器,或者使用了IE模式
如果你使用的是IE浏览器,建议您下载
360急速浏览器
/
火狐浏览器
/
Opera浏览器