In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example:(在使用AJAX调用的Web应用程序中,我需要提交一个请求,但要在URL的末尾添加一个参数,例如:)
Original URL:(原始网址:)
http://server/myapp.php?id=10(http://server/myapp.php?id = 10)
Resulting URL:(结果网址:)
http://server/myapp.php?id=10 &enabled=true(http://server/myapp.php?id = 10 &enabled = true)
Looking for a JavaScript function which parses the URL looking at each parameter, then adds the new parameter or updates the value if one already exists.(寻找一种JavaScript函数,该函数解析URL并查看每个参数,然后添加新参数或更新值(如果已经存在)。)
ask by Lessan Vaezi translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…