-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathduplicate_ids.html
More file actions
35 lines (34 loc) · 1.03 KB
/
duplicate_ids.html
File metadata and controls
35 lines (34 loc) · 1.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv=Content-Type content="text/html; charset=macintosh">
<title>Duplicate Search form IDs</title>
<script src="./bower_components/jquery/jquery.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<p>
This page is to test the practical impact of duplicate IDs with multiple ATs. The form fields below have the same IDs and the same labels. Enter text into the second form field and then try to submit the form using the form's buttons.
</p>
<form onsubmit="one()">
<label for="search">Search for:</label>
<input type="text" id="search" />
<button type="submit" id="submit">Submit</button>
</form>
<form onsubmit="two()">
<label for="search">Search for:</label>
<input type="text" id="search" />
<button type="submit" id="submit">Submit</button>
</form>
<script>
function one() {
alert('one');
}
function two() {
alert('two');
}
</script>
</body>
</html>