/[suikacvs]/www/test/html/form/text/value-crlf-charref.html
Suika

Contents of /www/test/html/form/text/value-crlf-charref.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download) (as text)
Sat May 27 08:30:55 2006 UTC (20 years, 6 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +28 -3 lines
File MIME type: text/html
DOM access added

1 wakaba 1.1 <!DOCTYPE html>
2 wakaba 1.2 <html lang="en">
3 wakaba 1.1 <head>
4     <title>Single-line Text Input with CRLF References</title>
5 wakaba 1.2 <script type="text/javascript" src="../../../support/result.js"></script>
6 wakaba 1.1 </head>
7 wakaba 1.2 <body onload="
8     var iel = document.getElementsByTagName ('input')[0];
9     setResult ('domValue', iel.value);
10     setResult ('domDefaultValue', iel.defaultValue);
11     setResult ('domGetAttributeValue', iel.getAttribute ('value'));
12     ">
13 wakaba 1.1 <h1>Single-line Text Input with <code>CRLF</code> References</h1>
14     <form action="../asis" method="post">
15 wakaba 1.2 <input type="text" name="text1" value="abcdefg&#x0A;&#x0D;ABCDEFG"
16     onchange="
17     setResult ('domValue', this.value);
18     setResult ('domDefaultValue', this.defaultValue);
19     setResult ('domGetAttributeValue', this.getAttribute ('value'));
20     ">
21 wakaba 1.1 <input type="submit">
22     </form>
23    
24 wakaba 1.2 <h2>Source Code</h2>
25    
26 wakaba 1.1 <p><code>value="abcdefg&amp;#x0A;&amp;#x0D;ABCDEFG"</code></p>
27 wakaba 1.2
28     <h2>DOM <code>value</code></h2>
29    
30     <p id="domValue"></p>
31    
32     <h2>DOM <code>defaultValue</code></h2>
33    
34     <p id="domDefaultValue"></p>
35    
36     <h2>DOM <code>getAttribute ('value')</code></h2>
37    
38     <p id="domGetAttributeValue"></p>
39 wakaba 1.1
40     </body>
41     </html>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24