Possible Duplicate:
(可能重复:)
I have the following URL:
(我有以下网址:)
http://www.mysite.co.uk/?location=mylocation1
What I need is to get the value of location
from the URL into a variable and then use it in a jQuery code:
(我需要的是从URL获取location
的值到一个变量,然后在jQuery代码中使用它:)
var thequerystring = "getthequerystringhere"
$('html,body').animate({scrollTop: $("div#" + thequerystring).offset().top}, 500);
Does anyone know how to grab that value using JavaScript or jQuery?
(有谁知道如何使用JavaScript或jQuery获取该值?)
ask by Tom translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…