问题描述:

I want to post a whole page using ajax to php file to be parsed.

say the sources is `http://www.mysite.com/page-1.

now post this page (from <html> to </html>) to "parse-page.php". and retrieve it with $_POST['document'].

网友答案:

Considering you just want to post the data and ignore anything coming back from the php, this should work.

$.post("parse-page.php", {'document', $('body').html()});

For more info: http://api.jquery.com/jQuery.post/

网友答案:

I'm thinking you can use javascript to store the innertext of the html tag and send that variable through ajax.

相关阅读:
Top