encode special characters




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;

nickname = escape(nickname);
password = escape(password);

window.location = window.location + "?nickname=" + nickname + "&password=" + password;
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form action="">
<tt><pre>
Nickname: <input type=text name=nickname value="" size=10>
Password: <input type=text name=password value="" size=10>

<input type=button value="Submit!" onClick="javascript:processForm(this.form);">
</pre></tt>
</form>
</center>



<!-- Script Size: 1.10 KB -->










Wyszukiwarka

Podobne podstrony:
character encoder
Napisy do Dragon Ball Z Movie Special 4 The World Of Dragonball Z
specialists4
Energy Mix Special Hardstyle?ition Volume0 11 www energy2000 eu
function utf8 encode
AttributeSet CharacterAttribute
Metal Hollow Sphere Structures characteristics
8 Last Minute Valentine Gifts Crochet Patterns for that Special Someone eBook
function base64 encode
2006 05?rtoon Creating Animated Characters with Blender
VtM Character Sheet Ravnos
function imap utf7 encode
replace characters
Tenchi Muyo Character Sheet

więcej podobnych podstron