0675346c by yangjianbin

init

1 parent 475a8d4b
...@@ -25,5 +25,24 @@ ...@@ -25,5 +25,24 @@
25 <title>标题</title> 25 <title>标题</title>
26 <script> 26 <script>
27 var apiBaseUrl = "http://151.28ms.com:8088/"; 27 var apiBaseUrl = "http://151.28ms.com:8088/";
28 (function($){
29 $.fn.serializeJson=function(){
30 var serializeObj={};
31 var array=this.serializeArray();
32 var str=this.serialize();
33 $(array).each(function(){
34 if(serializeObj[this.name]){
35 if($.isArray(serializeObj[this.name])){
36 serializeObj[this.name].push(this.value);
37 }else{
38 serializeObj[this.name]=[serializeObj[this.name],this.value];
39 }
40 }else{
41 serializeObj[this.name]=this.value;
42 }
43 });
44 return serializeObj;
45 };
46 })(jQuery);
28 </script> 47 </script>
29 </head> 48 </head>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
66 cache: false, 66 cache: false,
67 data:data, 67 data:data,
68 dataType:'json', 68 dataType:'json',
69 // contentType: "application/json; charset=utf-8", 69 contentType: "application/json; charset=utf-8",
70 success:function(data){ 70 success:function(data){
71 alert('success'); 71 alert('success');
72 }, 72 },
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!