简体   繁体   中英

send variable value with link to html - ajax page

I get a value in my index.html page that I would like to send to another .html page when I load that page. I´m using jQuery - ajax to load the page.

<a href="pagetoload.html?myvariable='+myvarvaluetosend+'">Load page</a> 

Something like that... But how do I get it in the page I´m loading...I´m totally blank :-)

With .asp I know how to do it but not when the resiving page has to be a .html page?

Any input really appreciated, thanks!

Using jQuery:

$("a").attr("href", "pagetoload.html?myvariable="+myvarvaluetosend);

See demo on jsFiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM