开发者

jquery load get variables back from loaded php file

开发者 https://www.devze.com 2023-02-19 16:10 出处:网络
i\'m loading a php file with jquery .load. with load it just loads my php file and displays it into my tabs which works fine.

i'm loading a php file with jquery .load.

with load it just loads my php file and displays it into my tabs which works fine.

but know i wanna pass some variable from t开发者_StackOverflowhe loaded file into the mainfile back.

how can i solve this ?

thanks a lot for you help


$("#feeds").load("feeds.php", {limit: 25}, function(){
alert("The last 25 entries in the feed have been loaded");
});

whereas limit is your name and 25 the value of the parameter

see: the API for more information on this


The easiest way I can think of would be to to have some hidden field containing the data you want in the page getting loaded. You could then simply get the values using jQuery after the load event.

0

精彩评论

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

关注公众号