开发者

AJAX with a POST in a same page

开发者 https://www.devze.com 2023-03-03 12:44 出处:网络
I have page with a POST which POST 3 data . am i possible to access开发者_如何学运维 this data within da same page using AJAX ?No, what you have to do is a background page which the user won\'t ever s

I have page with a POST which POST 3 data . am i possible to access开发者_如何学运维 this data within da same page using AJAX ?


No, what you have to do is a background page which the user won't ever see. That page is designed to speak with AJAX and nothing else.

You could probably make it possible using $_GET like mypage.php?ajax=true (would answer your request) and mypage.php?ajax=false would give the user the page contents.


yes you can use..but i suggest to use

jQuery.load for your purpose...

This method is the simplest way to fetch data from the server. It is roughly equivalent to $.get(url, data, success)

0

精彩评论

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