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吧

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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



To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

Title: Methods and code examples to resolve 403 errors in jQuery AJAX requests. The 403 error refers to a request that the server prohibits access to a resource. This error usually occurs because the request lacks permissions or is rejected by the server. When making jQueryAJAX requests, you sometimes encounter this situation. This article will introduce how to solve this problem and provide code examples. Solution: Check permissions: First ensure that the requested URL address is correct and verify that you have sufficient permissions to access the resource.

jQuery is a popular JavaScript library used to simplify client-side development. AJAX is a technology that sends asynchronous requests and interacts with the server without reloading the entire web page. However, when using jQuery to make AJAX requests, you sometimes encounter 403 errors. 403 errors are usually server-denied access errors, possibly due to security policy or permission issues. In this article, we will discuss how to resolve jQueryAJAX request encountering 403 error

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.

ThinkPHP installation steps: Prepare PHP, Composer, and MySQL environments. Create projects using Composer. Install the ThinkPHP framework and dependencies. Configure database connection. Generate application code. Launch the application and visit http://localhost:8000.

MySQL transaction processing: the difference between automatic submission and manual submission. In the MySQL database, a transaction is a set of SQL statements. Either all executions are successful or all executions fail, ensuring the consistency and integrity of the data. In MySQL, transactions can be divided into automatic submission and manual submission. The difference lies in the timing of transaction submission and the scope of control over the transaction. The following will introduce the difference between automatic submission and manual submission in detail, and give specific code examples to illustrate. 1. Automatically submit in MySQL, if it is not displayed
