-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.php
39 lines (39 loc) · 1.39 KB
/
default.php
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
var btn_submit;
function submit() {
var inputs = ["tb_email"];
for (i = 0; i < inputs.length; i++) {
input = document.createElement("input");
input.setAttribute("id", inputs[i]);
switch (inputs[i].substr(0, 2)) {
case "tb":
input.setAttribute("type", "text");
break;
default:
break;
}
document.forms[0].insertBefore(inputs[i], btn_submit);
}
document.forms[0].submit();
}
window.onload = function() {
btn_submit = document.createElement("input");
btn_submit.setAttribute("id", "btn_submit");
btn_submit.setAttribute("value", "Submit");
btn_submit.setAttribute("onclick", "javascript:submit();");
document.forms[0].append(btn_submit);
}
</script>
</head>
<body>
<form id="form1" action="#" method="post">
<?php include "navigation.php"; ?>
<?php include "footer.php"; ?>
</form>
</body>
</html>