Pass Parms Escaped

[Total: 0    Average: 0/5]

Passing parameters and unescaped text.

Head Code:

var _c="";
var _l=document.location.toString().split("?"); /* now _l is the parameters */
/* document.write("_l="+_l+"<BR>"); */

var _m ="";
 _m = _l[1].split("&");                /* now _m is an array of all parameters */

_m = ["mango", "banana", "cherry", "pear"];          /* define _m  default parameters */

document.write('<Font> '+unescape(_m[0])+' '+unescape(_m[1])+' '+unescape(_m[2])+' '+unescape(_m[3])+' </font>' );

Body Code:

function doIt()
This form posts the paramters to this same page
<form name=tf>
<input type=text name=t1 value="one a">
<input type=text name=t2 value="two b">
<input type=text name=t3 value="three c">
<input type=text name=t4 value="four d">
<input type=button onclick="doIt()" value="Submit">

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *