-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.php
More file actions
66 lines (55 loc) · 1.45 KB
/
Copy pathforms.php
File metadata and controls
66 lines (55 loc) · 1.45 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
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
function myfun()
{
var x=document.getElementById("txt").value;
if(x.length>5 && x.length<10)
{
document.getElementById("txtsp").innerHTML+="Go ahead";
document.getElementById("txtsp").style.color="green";
}
else
{
document.getElementById("txtsp").innerHTML+="Stop";
document.getElementById("txtsp").style.color="red";
}
}
</script>
<style>
#txt
{
width:200px;
height:20px;
float:left;
}
</style>
<title>Forms</title>
</head>
<body>
<form method="GET">
<table>
<tr>
<td> <input type="text" placeholder="Enter something" id="txt" onclick="myfun();"></td>
<td><span id="txtsp">*</span></td>
</tr>
<tr>
<td><input type="submit" value="submit01" name="btn"></td>
<td><input type="submit" value="submit02" name="btn1"></td>
</tr>
</table>
</form>
<?php
if (isset($_GET["btn"])) {
echo "submit01 has been awaken";
}
if (isset($_GET["btn1"])) {
echo " Submit02 has been called";
}
?>
</body>
</html>