Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

2T 13 Liaw Ann Lin RCG Part 3

<!DOCTYPE html>
<html>
<title>Web Page Design</title>
<head>
<script>

 var yourname = prompt("What is your name?");
 var yourclass = prompt ("What is your class?");
 var indexno = prompt ("What is your index number?");
 var eng = prompt("What are your marks for english?");
 var mt = prompt("What are your marks for your Mother Tongue?");
 var math = prompt("What are marks for Math?"); 
 var science = prompt("What are your marks for Science?"); 
 var total = Number(eng) + Number(mt) + Number(math) + Number(science) 

     document.write("{ Report Card } <br>");
     document.write("Name: " + yourname + "<br>");
     document.write("Class: " + yourclass + "<br>");
     document.write("Index No.: " + indexno + "<br>");
     document.write("<br>");
     document.write(" { Grades } <br>");
     document.write(" English: " + eng + "/100" + " (A) <br>" );
     document.write("Mother Tongue: " + mt + "/100" + " (A) <br>");
     document.write("Math: " + math + "/100" + " (A) <br>");
     document.write("Science: " + science + "/100" + " (A) <br>");
     document.write("Total Marks: " + total + "/400" + "<br>")

</script>
</head>
<body>
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.