Thursday, 3 July 2014

Lecture # 10

Following Topics were covered in Tenth Lecture:
  • JavaScript (Nested if)

Example 1:

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

var name=prompt("Enter your name : ");

if (name=="talha")
 {
  prompt("Yes, he is the student of this class.");
 }
 else if (name=="umeir")
 {
  prompt("Yes, he is the student of this class.");
 }
 else if (name=="ammad")
 {
  prompt("Yes, he is the student of this class.");
 }
 else if (name=="owais")
 {
  prompt("Yes, he is the student of this class.");
 }
 else if (name=="irma")
 {
  prompt("Yes, she is the student of this class.");
 }
 else if (name=="shafaq")
 {
  prompt("Yes, she is the student of this class.");
 }
 else
 {
  prompt("he is not the student of my class.");
 }
</script>
</head>
</html>



No comments:

Post a Comment