0
I get the box but when I put value it shows error in line 8
<html> <head> <title>Javascript</title> </head> <body> <script type="text/javascript"> var Varper=Number(prompt("Enter%")); if (per>=70) {document.write("Distinction");} elseif(per>=60) {alert("First Class");} elseif(per>=50) {document.write("Second Class");} elseif(per>=35) {document.write("Pass Class");} elseif(per>35) {document.write("Fail Class");} </script> </body> </html>
4 Respostas
+ 8
replace "elseif" with "else if"
+ 1
U created variable "Varper" but used per, try writing per only at its place. And second it's "if else" not ifelse. Hope it solves ur problem.
+ 1
thanks
+ 1
Yes ok