ThinkPhp ajax 交付

WBOY
Release: 2016-06-13 12:07:25
Original
777 people have browsed it

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吧

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!