-
Notifications
You must be signed in to change notification settings - Fork 0
/
expt_4.html
72 lines (64 loc) · 2.17 KB
/
expt_4.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
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<title>Experiment 4 - String Comparision</title>
<script src="js/expt_4.js"></script>
<center>
<h1>String Comparison </h1>
</center>
<body>
<center>
<h2>42360_Om Shinde</h2>
<hr>
<!-- LocaleCompare -->
<h3>Using LocaleCompare function</h3>
Enter First String : <input type="string" id="str11"></inputtype>
<br><br>
Enter Second String : <input type="string" id="str12"></inputtype>
<br><br>
<button onclick="compLocale()">Compare Using (Locale Compare)</button>
<br><br>
<p id="output1"></p>
<hr>
<!-- RegEx -->
<h3>Using Regular Expression</h3>
Enter First String : <input type="string" id="str21"></inputtype>
<br><br>
Enter Second String : <input type="string" id="str22"></inputtype>
<br><br>
<button onclick="compRegEx()">Compare (Using RegEx)</button>
<br><br>
<p id="output2"></p>
<hr>
<!-- Length & == Operator -->
<h3> Using Length & == Operator</h3>
Enter First String : <input type="string" id="str31"></inputtype>
<br><br>
Enter Second String : <input type="string" id="str32"></inputtype>
<br><br>
<button onclick="compUsing2eql()">Compare (Using ==)</button>
<br><br>
<p id="output31"></p>
<p id="output32"></p>
<hr>
<!-- === Operator -->
<h3> Using === Operator</h3>
Enter First String : <input type="string" id="str41"></inputtype>
<br><br>
Enter Second String : <input type="string" id="str42"></inputtype>
<br><br>
<button onclick="compUsing3eql()">Compare (Using ===)</button>
<br><br>
<p id="output4"></p>
<hr>
<!-- Logical Method -->
<h3> Using user defined Method</h3>
Enter First String : <input type="string" id="str51"></inputtype>
<br><br>
Enter Second String : <input type="string" id="str52"></inputtype>
<br><br>
<button onclick="compUsingUser()">Compare (Using user method)</button>
<br><br>
<p id="output5"></p>
</center>
</body>
</html>