开发者

post web page to php

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

s开发者_高级运维ay 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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜