jQuery從URL獲取查詢字符串我有以下網址:http://www.mysite.co.uk/?location=mylocation1我需要的是得到location從URL到變量,然后在jQuery代碼中使用它:var thequerystring = "getthequerystringhere"$('html,body').animate({scrollTop: $("div#" + thequerystring).offset().top}, 500);有人知道如何使用JavaScript或jQuery獲取該值嗎?
jQuery從URL獲取查詢字符串
慕標琳琳
2019-06-25 13:36:14