forked from stsquad/emacs_chrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ta_test.html
68 lines (55 loc) · 1.58 KB
/
ta_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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<style type="text/css">
div.editable {
width: 339px;
border-width: 1px;
box-sizing: border-box;
word-wrap: break-word;
}
</style>
<title>Text Area Test</title>
</head>
<body>
<script language="JavaScript">
function seeTextArea (form) {
alert (form.children[1].value);
}
</script>
<form name="myform">
<input type="button" name="ta1_test" value="Test" onclick="seeTextArea(this.form)"/>
<textarea name="first_textarea" cols="40" rows="5" id="foo">
Text Area 1
</textarea>
</form>
<form name="myform2">
<input type="button" name="ta2_test" value="Test" onclick="seeTextArea(this.form)"/>
<textarea name="second_textarea" cols="40" rows="5" id="bar">
Text Area 2
</textarea>
</form>
<form name="myroform">
<input type="button" name="ro_button" value="Test" onclick="seeTextArea(this.form)"/>
<textarea name="read" cols="40" rows="5" id="baz" readonly="readonly">
This is some read-only text
</textarea>
</form>
<p>
<div>
<input type="button" name="ro_button" value="Test" onclick="showDiv(#ce1)"/>
<div class="editable" id="ce1" contenteditable="true">
This is an editable div....
</div>
</div>
</p>
<p>
<div>
<input type="button" name="ro_button" value="Test" onclick="showDiv(#ce2)"/>
<div class="editable" id="ce2" contenteditable="plaintext-only">
Some content is plain text only...
</div>
</div>
</p>
</body>
</html>