/[suikacvs]/www/test/support/result0.js
Suika

Contents of /www/test/support/result0.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Jan 14 12:22:52 2007 UTC (19 years, 6 months ago) by wakaba
Branch: MAIN
File MIME type: application/javascript
New

1 wakaba 1.1 function htescape (s) {
2     return s.replace ('&', '&amp;').replace ('<', '&lt;');
3     } // htescape
4    
5     function writeResult (value) {
6     if (typeof (value) == 'undefined') {
7     document.write ('<code>undefined</code>');
8     } else if (value == null) {
9     document.write ('<code>null</code>');
10     } else {
11     var vString = value.toString ();
12     if (vString == '') {
13     document.write ('An empty string');
14     } else {
15     document.write ('<code>' + htescape (vString) + '</code>');
16     }
17     document.write (', type <code>' + htescape (typeof (value)) + '</code>');
18     }
19     } // writeResult

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24