jquery中ajax方法load get post与脚本文件如php脚本连接时,脚本怎样接受数据?

例如jquery实现ajax,用load()方法

$("div").load("gethint.php",{username:'mars'});

则在php脚本gethint.php中用$_POST[]来接受数据,load()用post方式传送数据。

 

用$.get()方法时用$_GET[]接受

用$.post方法时用$_POST接受 

posted @ 2016-06-23 22:56  夜深人静123  阅读(141)  评论(0编辑  收藏  举报