-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
41 lines (39 loc) · 1.54 KB
/
test.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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>jQuery disableAfterClick tests</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
.disabled { color: gray; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.disableafterclick.js"></script>
<script type="text/javascript">
window.log = function(name) {
$('<li>').text(name).appendTo('#eventlog');
};
$(function() {
$('button').add('a').add('input').disableAfterClick();
});
</script>
</head>
<body>
<ul>
<li><button type="button" onclick="log('button onclick')">Button</button></li>
<li><a href="javascript:log('anchor with javascript href')">Anchor with javascript href</a></li>
<li>
Form:
<form onsubmit="log('form submit'); return false;">
<ul>
<li><button type="submit" onclick="log('button type=submit')">button type=submit</button></li>
<li><input type="submit" value="input type=submit" onclick="log('input type=submit')" /></li>
</ul>
</form>
</li>
</ul>
<h3>Log</h3>
<ol id="eventlog"></ol>
</body>
</html>