JavaScript Source Code 3000: Forms: Encode Special Characters
Encode Special Characters
When submitting the form "GET" method, JavaScript can encode special characters with the escape() function. Great! (Enter a nickname or password with some special variables then click 'submit' to see the web address which contains the encoded (%xx) characters.)
Nickname: Password:
JavaScript Source Code 3000: Forms: Encode Special Characters Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!
<!-- TWO STEPS TO INSTALL ENCODE SPECIAL CHARACTERS:
1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<! > <! >
<!-- Begin function processForm(form) { var nickname = form.nickname.value; var password = form.password.value;