mirror of
https://github.com/Estom/notes.git
synced 2026-02-09 21:36:58 +08:00
前端笔记整理完成
This commit is contained in:
@@ -58,4 +58,17 @@ $("button").click(function(){
|
||||
alert("数据: \n" + data + "\n状态: " + status);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## 2 GET JSON方法
|
||||
GET - 从指定的资源请求数据.GET 基本上用于从服务器获得(取回)数据。注释:GET 方法可能返回缓存数据。
|
||||
```
|
||||
$.getJSON(URL,callback);
|
||||
|
||||
$("button").click(function(){
|
||||
$.get("demo_test.php",function(data,status){
|
||||
alert("数据: " + data + "\n状态: " + status);
|
||||
});
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user