How can I dynamically add a URL into javascript, to get a second page's div to display on the first page?
问题 Ok, so this what I have that works, for the starting code: $(document).ready(function(){ $('.currentpagediv').load('http://theurl.com/page2/somethingsomewhere.html .secondpagedivclass'); }); What this does, is find the div on the current page, <div class="currentpagediv"> , and add in the second page ( http://theurl.com/page2/somethingsomewhere.html ) div <div class="secondpagedivclass"> So for example, say I have a page like this: <html> <body> <div class="currentpagediv"> </div> </body> <