-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathq33.html
63 lines (46 loc) · 1.54 KB
/
q33.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
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<script>
function handleClick() {
alert("Button clicked!");
}
function handleAbort() {
alert("File upload aborted!");
}
function handleLoad() {
alert("Page loaded!");
}
function handleMouseOver() {
document.getElementById("myElement").style.backgroundColor = "red";
}
function handleMouseOut() {
document.getElementById("myElement").style.backgroundColor = "white";
}
function handleChange() {
alert("Value changed!");
}
function handleError() {
alert("An error occurred!");
}
</script>
</head>
<body>
<button onclick="handleClick()">Click Here</button>
<form>
<input type="file" onabort="handleAbort()"><br>
<input type="submit" value="Upload">
</form>
<p id="myElement" onload="handleLoad()">This paragraph will trigger the onload event.</p>
<p id="myElement" onmouseover="handleMouseOver()" onmouseout="handleMouseOut()">Hover over this paragraph to change
the color.</p>
<label for="mySelect">Select a Option :</label>
<select onchange="handleChange()">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
<br>
<img src="notexistingimage.jpg" onerror="handleError()" alt="Sample Image">
</body>
</html>