Javascript examples for String Operation:String Convert
Create a simple text to ascii converter
<html> <head></head> <body> <script type="text/javascript"> function asciify(txt) {/* ww w . j a v a 2 s. co m*/ return txt.charCodeAt(0); } </script> <form> <textarea name="txt_input"></textarea> <input type="button" value="Submit" onclick="this.form.txt_output.value = asciify(this.form.txt_input.value)"> <textarea name="txt_output"></textarea> </form> </body> </html>