-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathj2.html
51 lines (35 loc) · 887 Bytes
/
j2.html
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
<html>
<head>
<script>
function get(){
document. getElementById("me").src = "pic.jpg";
}
function get1(){
document. getElementById("me").src = "shami.jpg";
}
</script>
</head>
<body>
<img id = "me" src="shami.jpg" width="200px" height="200px"> <br>
<button onclick="get();">click me </button>
<button onclick="get1();">now click me </button>
</body>
</html>
<!-- we can written .stlye.width to increase width of pic
<html>
<head>
<script>
function get(){
document. getElementById("me").style.display= "none";
}
function get2(){
document. getElementById("me").style.display= "block";
}
</script>
</head>
<body>
<img id = "me" src="shami.jpg" width="200px" height="200px"> <br>
<button onclick="get();">click me </button>
<button onclick="get2();"> now click me </button>
</body>
</html>