$.ajx的用法
$.ajax({
type:'post',//可选get
url:'action.php',//这里是接收数据的PHP程序
data:'data='dsa'',//传给PHP的数据,多个参数用&连接
dataType:'text',//服务器返回的数据类型 可选XML ,Json jsonp script html text等
error:function(){
alert('页面请求错误!');
}
success:function(msg){
//这里是ajax提交成功后,PHP程序返回的数据处理函数。msg是返回的数据,数据类型在dataType参数里定义!
},
})
随机推荐
- 如何让一个类可以被foreach枚举?
答:实现IEnumerable或其IEnumerable<T>.该接口只有一个函数 public IEnumerator GetEnumerator(); 在这里,IEnumerator也 ...
- Mongoose 的实例方法中访问静态方法
方法比较简单,也比较粗糙和丑陋,就是通过构造函数来访问静态方法,大致如下: 123456789 WorkSpaceSchema.methods.getPrice = function(startTim ...
- C#导入导出数据你该知道的方法。
导入数据 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; us ...
- Lua输入输出库
1.简单模型 )1.io.write函数: 函数模型为io.write(...) )2.io.read函数: io.read(“*all”) 读取当前输入的整个文件 io.read(”*line“) ...
- android——利用SharedPreference做引导界面
很久以前就接触过sharedPreference这个android中的存储介质.但是一直没有实际使用过,今天在看之前做的“民用机型大全”的app时,突然想到可以使用sharedPreference类来 ...
- ZOJ 2771
Description Considering a light entering three adjacent planes of glass. At any meeting surface, t ...
- Codeforces554 C Kyoya and Colored Balls
C. Kyoya and Colored Balls Time Limit: 2000ms Memory Limit: 262144KB 64-bit integer IO format: %I64d ...
- Flink - InstanceManager
InstanceManager用于管理JobManager申请到的taskManager和slots资源 /** * Simple manager that keeps track of which ...
- iOS开发中获取WiFi相关信息
iOS 开发中难免会遇到很多与网络方面的判断,这里做个汇总,大多可能是与WiFi相关的. 1.Ping域名.Ping某IP 有 时候可能会遇到ping 某个域名或者ip通不通,再做下一步操作.这里的p ...
- Mysql 获取年级每个班前十学生的信息
select * from Table1 a where 10>(select count(*) from Table1 where ClsNo=a.ClsNo and Score>a.S ...