|
@@ -91,35 +91,48 @@ function onClik() {
|
|
|
var jsonString = JSON.stringify(jsonInfo);
|
|
|
alert(jsonString);
|
|
|
console.log(jsonString);
|
|
|
+ // $.ajax({
|
|
|
+ // type: 'POST',
|
|
|
+ // url: 'http://172.105.205.52:8001/deco_request_detail',
|
|
|
+ // data: jsonString,
|
|
|
+ // dataType: 'json',
|
|
|
+ // success: function (data, textStatus, jqXHR) {
|
|
|
+
|
|
|
+ // alert("送出成功");
|
|
|
+ // },
|
|
|
+ // complete: function () {
|
|
|
+ // alert("complete");
|
|
|
+ // },
|
|
|
+ // beforeSend: function () {
|
|
|
+ // alert("beforeSend");
|
|
|
+ // },
|
|
|
+
|
|
|
+
|
|
|
+ // error: function (jqXHR, textStatus, errorThrown) {
|
|
|
+ // alert("送出失敗");
|
|
|
+
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+
|
|
|
$.ajax({
|
|
|
- type:'POST',
|
|
|
url:'http://172.105.205.52:8001/deco_request_detail',
|
|
|
- data: jsonString,
|
|
|
+ type: 'POST', // http method
|
|
|
+ data:jsonString, // data to submit
|
|
|
dataType: 'json',
|
|
|
- success: function (data, textStatus, jqXHR) {
|
|
|
-
|
|
|
- alert("送出成功");
|
|
|
- },
|
|
|
- beforeSend: function () {
|
|
|
- alert("beforeSend");
|
|
|
- },
|
|
|
- complete: function () {
|
|
|
- alert("complete");
|
|
|
+ success: function (res) {
|
|
|
+ console.log(res);
|
|
|
},
|
|
|
-
|
|
|
- error: function (jqXHR, textStatus, errorThrown) {
|
|
|
-
|
|
|
- console.log(JSON.stringify(jqXHR));
|
|
|
- console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
|
|
|
- alert("送出失敗");
|
|
|
-
|
|
|
+ error: function (err) {
|
|
|
+ console.log(err);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$("*").each(function (index, element) {
|
|
|
// 此元素被點選後執行
|
|
|
$(this).click(function (e) {
|