summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/tests/console.html
diff options
context:
space:
mode:
authorxue <>2005-12-05 01:00:16 +0000
committerxue <>2005-12-05 01:00:16 +0000
commitccf76e430b7703db028966a845a966f50956f490 (patch)
tree9762b746f8b7d432dbe5e5cb8f38f90007e0e1b5 /framework/Web/Javascripts/tests/console.html
parent418baf36d477bcbdd6fb4eaf4037ea6a2d93f21c (diff)
Diffstat (limited to 'framework/Web/Javascripts/tests/console.html')
-rw-r--r--framework/Web/Javascripts/tests/console.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/tests/console.html b/framework/Web/Javascripts/tests/console.html
new file mode 100644
index 00000000..e6aed30f
--- /dev/null
+++ b/framework/Web/Javascripts/tests/console.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>Prototype Console</title>
+ <script src="../dist/prototype.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ function test() {
+ var out = $('out');
+ try {
+ input = $F('input');
+ out.innerHTML += input.escapeHTML() + '<br />';
+ value = eval(input);
+ out.innerHTML += '=> ' + value.toString().escapeHTML() + '<br />';
+ } catch (e) {
+ out.innerHTML += 'Error: ' + e.toString().escapeHTML() + '<br />';
+ }
+ $('input').value = '';
+ }
+ </script>
+ </head>
+ <body>
+ <form onsubmit="test(); return false">
+ <input type="text" size="60" id="input" />
+ <input type="submit" value="Execute" />
+ </form>
+ <div id="test"></div>
+ <div id="out"></div>
+ </body>
+</html>