-
Notifications
You must be signed in to change notification settings - Fork 0
/
expt_6.html
57 lines (51 loc) · 1.78 KB
/
expt_6.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
<!DOCTYPE html>
<html>
<head>
<center>
<title>Experiment 6 - Array Operations</title>
</center>
<script src="js/expt_6.js"></script>
</head>
<body style="text-align: center;">
<h2>42360_Om Shinde</h2>
<hr>
<h1>Array Operations</h1>
<label for="1">Enter Array Length:</label>
<input type="number" id="1" />
<button onclick="lengthh()">Set Length</button>
<br />
<label for="2">Enter Array Elements (comma-separated):</label>
<input type="text" id="2" />
<button onclick="arrayip()">Insert Elements</button>
<br />
<label for="delete">Delete Element:</label>
<input type="text" id="delete" />
<button onclick="del()">Delete by Value</button>
<button onclick="delByIndex()">Delete by Index</button>
<br />
<label for="fnd">Find Element:</label>
<input type="text" id="fnd" />
<button onclick="find()">Find by Value</button>
<button onclick="findIndex()">Find Index by Value</button>
<br />
<label for="replace-index">Replace Element by Index:</label>
<input type="text" id="replace-index" />
<input type="text" id="replace-value" />
<button onclick="replaceByIndex()">Replace</button>
<br />
<label for="replace-value">Replace Element by Value:</label>
<input type="text" id="replace-value2" />
<input type="text" id="replace-new-value" />
<button onclick="replaceByValue()">Replace</button>
<br />
<button onclick="Empty()">Empty Array</button>
<button onclick="Display()">Display Array</button>
<br />
<div id="res1"></div>
<div id="res2"></div>
<div id="res3"></div>
<div id="res4"></div>
<div id="res5"></div>
<div id="res6"></div>
</body>
</html>