简体   繁体   English

将查询字符串附加到URL

[英]Appending Query String to URL

I am taking some data from user , and then taking data from server, by a get request, sending the request parameters in query string. 我从用户那里获取一些数据,然后通过获取请求从服务器获取数据,以查询字符串的形式发送请求参数。 How should I change the URL, so that it contains the query string when it shows data for those request parameters in browser 我应该如何更改URL,以便在浏览器中显示这些请求参数的数据时包含查询字符串

like abc.com while showing data for param1 and param 2 should be : abc.com?param1=val1&param2=val2 像abc.com一样,同时显示参数1和参数2的数据应为:abc.com?param1= abc.com?param1=val1&param2=val2

$.get("/My_sevlet?asin="+val1+"&param2="+val2,function(data){addToTables(data);hideLoading();},"text");

when it shows results from server in browser still, the URL is abc.com. 当它仍在浏览器中显示服务器的结果时,URL为abc.com。 Thanks in advance 提前致谢

如果您的意思是我想的那样-您将无法更改浏览器窗口中显示的URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM