-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1html
More file actions
58 lines (47 loc) · 2.08 KB
/
test1html
File metadata and controls
58 lines (47 loc) · 2.08 KB
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
<!DOCTYPE html>
<html>
<body>
<p><b> Author:</b> <input id="Author" type="text" > </p>
<p><b> Title:</b> <input id="Title" type="text" > </p>
<p><b> Genre:</b> <select id="dropList">
<option>Science fiction</option>
<option>Satire</option>
<option>Drama</option>
<option>Action and Adventure</option>
<option>Romance</option>
<option>Mystery</option>
<option>Horror</option>
</select> </p>
<p><b> Price:</b> <input id="Price" type="text" onkeypress="return isNumberKey(event)"/> </p>
<p> <input id="insertButton" type="button" value="Submit Query"></p>
<p> <input id="searchBox" type="text">
<input id="searchButton" type="button" value="Submit Query"></p>
</body>
<script type="text/javascript" src="client.js"></script>
<script>
//make sure that user write only integers in price textbox
function isNumberKey(evt){
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode != 46 &&(charCode < 48 || charCode > 57))){
alert("Write only intergers");
return false;
}
return true;
}
// function print(){
// // var text1= document.getElementById('text1');
// var inputOfText1= document.getElementById('text1').value;
//
// var t1Element= document.createElement('h1');
// var textOft1Element= document.createTextNode(inputOfText1);
// t1Element.appendChild(textOft1Element);
//
// var div1Area=document.getElementById('div1');
// div1Area.appendChild(t1Element);
// }
// function alert(){
// document.
// }
//
</script>
</html>