-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathevents.html
26 lines (26 loc) · 921 Bytes
/
events.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
<!DOCTYPE html>
<html>
<head>
<script>
function Actions(obj, event) {
document.write("Button Value :" + obj.value + "<br>" + "Button Name :" + obj.name + "<br>");
switch(obj.value) {
case "Insert":
document.write("Record Inserted <br>");
break;
case "Delete":
document.write("Record Deleted <br>");
break;
}
for(var property in event)
{
document.write(property + "<br>");
}
}
</script>
</head>
<body>
<button onclick="Actions(this, event)" name="btnInsert" value="Insert">Insert</button>
<button onclick="Actions(this, event)" name="btnDelete" value="Delete">Delete</button>
</body>
</html>