/[suikacvs]/www/test/dom/form/textarea/value/nbsp-value-2.html
Suika

Contents of /www/test/dom/form/textarea/value/nbsp-value-2.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Thu Aug 23 06:54:58 2007 UTC (18 years, 10 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New test; see <http://suika.fam.cx/gate/2005/sw/textarea> for result

1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>NBSP and &lt;textarea>.value = ""</title>
5 </head>
6 <body>
7 <p id=result class=FAIL>FAIL (noscript)</p>
8 <p><textarea></textarea></p>
9 <script>
10 var result = document.getElementById ('result');
11 result.firstChild.data = 'FAIL';
12
13 var ta = document.getElementsByTagName ('textarea')[0];
14 ta.value = '\u00A0';
15
16 var index = ta.value.indexOf ('\u00A0');
17 if (index == 0) {
18 result.firstChild.data = 'PASS';
19 result.className = 'PASS';
20 } else {
21 result.firstChild.data = 'FAIL (' + index + ', 0 = 0x' + ta.value.charCodeAt (0).toString (16).toUpperCase () + ')';
22 }
23 </script>
24 </body>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24