Home  >  Article  >  Backend Development  >  ThinkPhp ajax 交付

ThinkPhp ajax 交付

WBOY
WBOYOriginal
2016-06-13 12:07:25734browse

ThinkPhp ajax 提交
本人新手 弱弱的问个问题 
function aa(){
        //ThinkAjax.sendForm(表单ID,URL,回调函数,信息显示的地方);
        ThinkAjax.sendForm('frm','app/Lib/modules/dealModule/add',wc);   
    }
    function wc(data,status){
        if(status!=1){
            alert('发送失败');
        }else{
            alert('2')
        }   
    }

-------------------------------------------------------------------------------------------------------------------
  
function TiJiao()

var name = document.getElementById("UserNaem").value;
var Eamil=document.getElementById("Eamil").value;
var Phone=document.getElementById("Phone").value;
var JinEr=document.getElementById("JinEr").value;

jQuery.ajax({ 
url:'app/Lib/modules/dealModule/add',
        type:'POST',
        data: {'UserNaem':name,'Eamil':Eamil,'Phone':Phone,'JinEr':JinEr},
        success:function(result){
           alert(result)
        },
        error:function(msg){
            alert('Error:');
        }
    });  
 } 



两个js 上面的两个引用的js一直prototype.js 报错Uncaught TypeError: undefined is not a function 这个错误  不知道怎么提交到后台
------解决思路----------------------
jQuery.ajax({ ......
这分明是 jQuery.js
你怎么说是 prototype.js 呢?
------解决思路----------------------
这个是Jquery吧。
------解决思路----------------------
没有引用jquery.min.js吧

Statement:
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