开发者

Getting the urls params in a page using jquery [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Get QueryString values in Javascript

Hey all,

ive read and read and i feel im missing something so im going to ask.

what im trying to do:

get the url params from page using jquery.

function findIt() {
    $.ajax({
        url: "${开发者_如何学JAVAurl.context}/itemlist/getitemlist",
        params: "foobar",
        context: document.body,
        success: function (data) {
            $('#results').html(data);

        }
    });
};

the url in which im sending the params to is where i need to grab the parameters using jquery.

e.g. in Php:

$foo = $_GET['name']

in jquery?????

i know this has to be simple, but im lost. any help would be appreciated.


See How can I get query string values in JavaScript? for tons of possible solutions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜