javascript - how to retrieve the parameters that are passed in the url of a asp file -


I am passing two variables on a classic ASP page in the URL -

  Www.webart.com/classic.asp?a=1&b=18  

Now I need to call a function in the classic.asp file which requires two variables such as

function getValues ​​(A, B) {content .....; }

And I'm not able to get the value of a and b in the asp page.

If you can try JavaScript in the same page

  Function getValues ​​(& lt;% = Request.QueryString ("a")%>, & lt;% = Request.QueryString ("b")% & gt;)  

Full code sample:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script & gt; Function dotest (A, B) {Warning (A); Warning (b); }; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "dotest (& lt;% = Request.QueryString (" a ")%>, & lt;% = request .QueryString (" b ")%>;);> Testing & lt; / Body> & lt; / html & gt;  

Comments