-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassWork.html
More file actions
56 lines (53 loc) · 1.49 KB
/
Copy pathClassWork.html
File metadata and controls
56 lines (53 loc) · 1.49 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css"></style>
</head>
<body>
<!-- <h1>Laptop</h1>
<li>cpu</li>
<li>hard_disk</li>
<li>ram</li>
<li>os</li>
<li>display_sie</li> -->
<script>
function Computer(name, cpu, hard_disk, ram, os, display_size) {
this.name = name;
this.cpu = cpu;
this.hard_disk = hard_disk;
this.ram = ram;
this.os = os;
this.display_size = display_size;
this.getName = function() {
return this.name;
};
this.getCpu = function() {
return this.cpu;
}
this.getHard_disk = function() {
return this.hard_disk;
};
this.getRam = function() {
return this.ram;
};
this.getOs = function() {
return this.os;
};
this.getDisplay_size = function() {
return this.display_size;
};
};
var myComp = new Computer("Lenovo", "ghz", "500Gb", "8Gb", "Window", "28 inch");
document.write("<ul>");
document.write("<li>" + myComp.getName() + "</li>");
document.write("<li>" + myComp.getCpu() + "</li>");
document.write("<li>" + myComp.getHard_disk() + "</li>");
document.write("<li>" + myComp.getRam() + "</li>");
document.write("<li>" + myComp.getOs() + "</li>");
document.write("<li>" + myComp.getDisplay_size() + "</li>");
document.write("</ul>");
</script>
</body>
</html>