-
Notifications
You must be signed in to change notification settings - Fork 1
/
Event.html
56 lines (56 loc) · 1.21 KB
/
Event.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
<html>
<head><center>Events</center>
<title>String Operations</title>
</head>
<body>
<script language = "JavaScript">
function concat() {
with(document.Simple) {
var x=first.value;
var y=second.value;
res.value = x+y;
}
}
function subStr() {
with(document.Simple) {
var x=first.value;
res.value = x.substr(4,8);
}
}
function subString() {
with(document.Simple) {
var x=first.value;
fourth.value = x.substring(0,3);
}
}
function toLower() {
with(document.Simple) {
var x=first.value;
third.value = x.toLowerCase();
}
}
function toUpper() {
with(document.Simple) {
var x=first.value;
second.value=x.toUpperCase();
}
}
function trm() {
with(document.Simple) {
var x=first.value;
first.value=x.trim();
}
}
</script>
<form name = "Simple">
String : Auto Trim : Blur Event :
<input type = "text" name = first value = "" onblur="trm();"> <BR><BR>
String : Auto UpperCase : OnFocus :
<input type = "text" name = second value = "" onFocus="toUpper();"> <BR><BR>
String : Auto LowerCase : MouseOverOccurance :
<input type = "text" name = third value = "" onMouseOver="toLower();"> <BR><BR>
String : Auto Substring : MouseOutOccurance :
<input type = "text" name = fourth value = "" onMouseOut="subString();"> <BR><BR>
</form>
</body>
</html>