Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>JS interpreter</title>
- </head>
- <body>
- <textarea id="editor" rows="10" cols="45"></textarea>
- <br/>
- <input type="button" id="run" value="Run"></input>
- <div id="result">
- </div>
- <script>
- document.getElementById('run').onclick = function()
- {
- var res = document.getElementById('result');
- var text = document.getElementById('editor');
- res.innerHTML = eval(text.value);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement