最佳答案
                                        
                                                                        
                                我有以下URL:
http://www.mysite.co.uk/?location=mylocation1
我需要从URL中获取location的值,然后在jQuery代码中使用它:
var thequerystring = "getthequerystringhere"
$('html,body').animate({scrollTop: $("div#" + thequerystring).offset().top}, 500);
如何使用JavaScript或jQuery获取该值?