-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssign_35.html
More file actions
32 lines (31 loc) · 1.05 KB
/
Copy pathAssign_35.html
File metadata and controls
32 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
var doctor=function()
{
this.docName=prompt("Enter doctor name ");
this.docExp=prompt("Enter doctor experience");
}
var nurse=function()
{
this.nurseName=prompt("Enter nurse name ");
this.nurseExp=prompt("Enter nurse experience");
}
nurse.prototype=new doctor();
doctor.prototype.patientName=prompt("Enter patient name");
var obj=new nurse();
document.write("<b>Doctor name : </b>"+obj.docName);
document.write("<br><b>Doctor experience : </b>"+obj.docExp);
document.write("<br><b>Nurse name : </b>"+obj.nurseName);
document.write("<br><b>Nurse experience : </b>"+obj.nurseExp);
document.write("<br><b>Patient name : </b>"+obj.patientName);
</script>
</body>
</html>