-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdom4.html
More file actions
38 lines (31 loc) · 754 Bytes
/
dom4.html
File metadata and controls
38 lines (31 loc) · 754 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
31
32
33
34
35
36
37
38
<!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</h3>
<h1 id="h">hello</h1>
<input type="text" id="tb" value="1000">
<hr>
<script>
const h1=document.getElementBy("h");
document.write(`${h1.innerHTML}<br>`);
//h1.innerHTML="";
h1.innerHTML+=" shiva";
const tf=document.getElementById(`tb`);
document.write(`${tf.value}<br>`);
//tf.value="";
tf.value=2000;
</script>
</body>
</html>
<!--settings:
eleobj.attr=> return value
eleobj
-->