一个关于ajax的有关问题,帮忙看上是什么情况
Jun 13, 2016 pm 12:54 PM
ajax
name
nbsp
user
一个关于ajax的问题,帮忙看下是什么情况
HTML代码:
js代码:
function get_user_jifen(user_name){
if(user_name == ""){
//document.getElementById('user_jifen').innerHTML = "用户名不能为空";
$("#user_jifen").html("用户名不能为空");
return false;
} else {
$.ajax({
type: "POST",
url: "user_jifen.php",
dataType:"html",
data: "act=ajax&user_name="+user_name,
success:function(msg){
$("#user_jifen").html(msg);
},
error:function()
{
$("#user_jifen").html("查询出错");
}
});
}
}
PHP代码:
//会员积分兑换ajax
elseif ($_REQUEST['act'] == 'ajax')
{
/* 权限的判断 */
//admin_priv('logs_manage');
/* 模板赋值 */
echo "成功进入";
}
运行之后,老是在ajax那块进入error提示:

帮忙看下,该怎么解决?
------解决方案--------------------
换成$_POST试试
或者根本没进入elseif这块
------解决方案--------------------
user_jifen.php 不存在
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari?

How to solve the 403 error encountered by jQuery AJAX request

How to solve jQuery AJAX request 403 error

How to get variables from PHP method using Ajax?

How to solve the problem of jQuery AJAX error 403?

PHP vs. Ajax: Solutions for creating dynamically loaded content

Understanding Ajax Frameworks: Explore Five Common Frameworks
