Javascript location href changed queryString (& gt;)>

I have the following code on my page.

   
 <script>
        var url = "http: //localhost/login.aspx? returnUrl = / ABC / abc.aspx & gt_no = 1234567 & code = SC";
        window.location.href = url;
    </script>

when i load the page, it redirects to

http://localhost/login.aspx?returnUrl=/ABC/abc.aspx>_no=1234567&code=SC

parameter & gt_no changed to _ no

Is there a way to keep & gt_no unchanged after the redirect?

My project is not allowed to use the parameter name & gt_no .

The problem is not only in the local host.

Thank!

+3
source share
3 answers

, HTML-, :)

> - HTML- >. , gt_no . , (&) HTML-.

+1

URL- , :

var url = "http://localhost/login.aspx?returnUrl=/%26gt_no=1234567&code=SC";
+1
var url = "http://www.google.com/login.aspx?    
returnUrl=/ABC/abc.aspx&amp;gt_no=1234567&code=SC";
window.location.href = url;
0
source

All Articles