-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (74 loc) · 2.51 KB
/
index.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE HTML>
<html>
<head>
<title>variadic functions and arguments</title>
<meta charset = "UTF-8">
</head>
<!--
NOTE:
Because of the shortness of the html code
and demonstration purposes, the "style" attribute is used within html tags.
Nevertheless it is recommended to use CSS for styling.
Some tag attributes are put into new lines, to keep them more visible.
-->
<body>
<h2>Generate Matrix NxM</h2>
<section>
<ul style="border: 1px solid green; width:200px; padding:30px;background-color:#D7ECFF">
<li>
N - Rows
</li>
<input type="number" name="product" min="1" value="1">
<br>
<br>
<li>
M - Columns
</li>
<input type="number" name="product" min="1" value="1">
<br>
<br>
<!--
NOTE:
The arguments in the function "generateMatrix" are the values taken
from input "N - Rows" and input "M - Columns".
This is not a very clean coding style, because it makes the code readability difficult.
It serves here only for demonstration purposes!
-->
<button type="button"
onclick="generateMatrix(document.getElementsByName('product')[0].value, document.getElementsByName('product')[1].value);">
GENERATE
</button>
</ul>
<!--The width supports only a 10x10 Matrix-->
<div style="border: 1px solid green; width:365px; margin-bottom:15px; padding:20px;background-color:#e9d0e1">
<div id="matrix"></div>
<br>
<br>
<button class="btnCALC" type="button" onclick="Calculate(true,false);" style="visibility:hidden;">
FIXED
</button>
<br>
<br>
<textarea id="usr-input" style="visibility:hidden;" rows = "3" cols = "40" >
alert(calcAverage(1,2,3));
</textarea>
<button class="btnCALC" type="button" onclick="Calculate(false,true);" style="visibility:hidden;">
VARIADIC
</button>
</div>
<div
id="result"
style="border: 1px solid green; width:200px; padding:20px;background-color:#68FFA7">
</div>
</section>
<br>
<br>
--------------------------------------------------------------------------------------------------
<br>
<br>
For more explanation please visit -
<a href = "https://github.com/Incrementis/Javascript-variadic-functions-and-arguments-/wiki">
variadic functions and arguments Wiki</a>
</body>
<script language = "javascript" type = "text/javascript" src = "arguments.js"></script>
</html>