weixin_33714884 2014-01-02 18:43 采纳率: 0%
浏览 172

为什么无法发送 ajax 请求?

我有如下代码:

$('#clicker_continue').click(function(){
    $.ajax({
        type:'POST',
        url: 'includes/functions/register_user.php',
        data: {
            'username':dat_usr,
            'email':dat_email,
            'password':dat_pas,
            'question':dat_que,
            'answer':dat_ans,
            'ip':data.ip
        },  
        dataType:'html',
        succes:function(response){
            $('#main_wrapper').append(response);
        }
    }); 

当我看到NetworkMonitor并点击#clickerContinue时,我并没有看到Ajax请求register_user.php。出什么问题了?

  • 写回答

2条回答 默认 最新

  • weixin_33744854 2014-01-02 18:45
    关注

    Spelling mistake in your $.ajax call. You forget the extra s on the end of success:

    $.ajax({
        type:'POST',
         url: 'includes/functions/register_user.php',
         data: {'username':dat_usr, 'email':dat_email, 'password':dat_pas, 'question':dat_que, 'answer':dat_ans  ,'ip':data.ip},
         dataType:'html',
         success:function(response){
             $('#main_wrapper').append(response);
        }
    });
    
    评论

报告相同问题?

悬赏问题

  • ¥15 我想在一个软件里添加一个优惠弹窗,应该怎么写代码
  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流