javascript - place value into input box from query string not working -
how can take value of query string , place input box? have:
<input type="text" name="spouse" id="spouse" value="<script type="text/javascript"> document.write("name: " + request.querystring("spouse")); </script>"/> but takes script take , of contents , places input box.
i able take query string coming code:
<tr > <td><input type="text" name="n1" value="duck, donald" /></td> <td><input type="text" name="n2" value="daisy" /></td> <td><input type="button" value="show" title="show" onclick="location.href='example123.html?name=' + escape(this.form.n1.value)+ '&spouse=' + escape(this.form.n2.value);" /> </td> and have value name or spouse appear inside of input box. proper way place value input box query string?
request.querystring not native javascript function. use document.location object , parse out value want.
Comments
Post a Comment