Tutorials to .com

Tutorials to .com » Asp » Encoding » Pass parameters through the address bar. Passing through the url parameters

Pass parameters through the address bar. Passing through the url parameters

Print View , by: iSee ,Total views: 47 ,Word Count: 249 ,Date: Thu, 28 May 2009 Time: 5:41 PM

I can see it? Should be all right. (Through the transmission parameters of the address bar) (passing through the url parameters)
<script language="Javascript">
var goUrl = "index.asp? schooltype = & area =";
function getType (vl)
(var stno, arno, tmpurl;
stno = goUrl.indexOf ( "schooltype =");
arno = goUrl.indexOf ( "area =");
if (stno! =- 1 & & arno! =- 1 & stno <arno)
(tmpurl = goUrl.substr (0, stno +11);
tmpurl = tmpurl + vl + goUrl.substr (arno-1);
goUrl = tmpurl;
)
)
function getArea (vl)
(var arno, tmpurl;
arno = goUrl.indexOf ( "area =");
tmpurl = goUrl.substr (0, arno +5);
goUrl = tmpurl + vl;
)
function goNext ()
(/ / The best to judge whether the user has chosen can be used to determine the length of gourl
window.location = goUrl;
)
</ script>

<td width=23% valign=top> <input ONCLICK='getType(1);' type=radio name=schooltype VALUE='1'> Primary School </ td>
<td valign=top ID=ID_177> <br> <input type=radio name=area ONCLICK='getArea(177);' ID=IDC_177 value='177'> Fuzhou </ td>
<td valign=top ID=ID_177> <br> <input type=radio name=area ONCLICK='goNext();' ID=IDC_177 value='177'> Next </ td>


Your choice can be added to Jiang parameters in the url. Can be used to substitute for the submission form.


Asp Script encoding Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.