This repository was archived by the owner on Mar 30, 2022. It is now read-only.
forked from Topener/jQuery-html5-placeholder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
71 lines (64 loc) · 1.85 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
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
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Placeholder test page</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="html5placeholder.jquery.js"></script>
<script>
$(function(){
$(':input[placeholder]').placeholder();
//-- Make sure we don't break if someone applies this to an element that
// doesn't have a placeholder
$('#noPlace').placeholder();
});
</script>
<style>
body {width:500px;margin:20px auto;}
div {margin-bottom:10px;}
</style>
</head>
<body>
<form>
<div>
<label for="email">Email: </label>
<input type="email" id="email" placeholder="username@thissite.com" />
</div>
<div>
<label for="foo">Password: </label>
<input type="password" id="pw" placeholder="It's like, your password" />
</div>
<div>
<label>Text:
<input type="text" name="text" maxlength="6" placeholder="Hi Mom"/>
</label>
</div>
<div>
<label>Search:
<input type="search" name="text" placeholder="Search Things and Stuff" />
</label>
</div>
<div>
<label>Telephone:
<input type="tel" name="text" placeholder="(XXX) XXX-XXXX"/>
</label>
</div>
<div>
<label>URL:
<input type="url" id="url" name="earl" placeholder="http://miketaylr.com" />
</label>
</div>
<div>
<label>No Placeholder:
<input type="text" id="noPlace" name="noPlace" maxlength="6"/>
</label>
</div>
<div>
<label>Text Area
<textarea placeholder="This is a text area." id="textArea" rows="7" cols="11" name="textArea"></textarea>
</label>
</div>
<input type="submit" />
</form>
</body>
</html>