-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdom5.html
More file actions
30 lines (27 loc) · 684 Bytes
/
Copy pathdom5.html
File metadata and controls
30 lines (27 loc) · 684 Bytes
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
<!DOCTYPE html>
<html lang="em">
<head>
<script>
const sum=function(x=0,y=0,z=0){//default params
return x+y+z;
}
</script>
<title>DOM</title>
</head>
<body>
<h3>demo on element object properties (attributes)</h3>
<img src="bike.jpg" width="200px" height="160px">
<br>
<input type="password" id="pw">
<hr>
<script>
const i=document.images[0];
document.write(`${i.src} ${i.width} ${i.height}<br>`);
i.src="pakhi.jpg"
i.width="150";
i.removeAttribute("height");
i.title="Pakhi ka photo";
document.getElementById("pw").type="password"
</script>
</body>
</html>