質問編集履歴

2

追記

2020/03/04 02:22

投稿

u-sukesan
u-sukesan

スコア156

test CHANGED
File without changes
test CHANGED
@@ -48,35 +48,45 @@
48
48
 
49
49
  ```ここに言語を入力
50
50
 
51
- function ajax_form(){
52
51
 
53
- $.ajax({
54
52
 
55
- type: 'post',
56
53
 
57
- url: ajaxurl,
58
54
 
59
- dataType:'json',
55
+ jQuery(function($){
60
56
 
61
- async: false,
57
+ ajax_form();
62
58
 
63
- data: {
64
59
 
65
- 'action':'get_obj',
66
60
 
67
- },
61
+ function ajax_form(){
68
62
 
69
- success: function( response ){
63
+ $.ajax({
70
64
 
71
-                 console.log('成功');
65
+ type: 'post',
72
66
 
73
- }
67
+ url: ajaxurl,
74
68
 
75
- });
69
+ dataType:'json',
76
70
 
77
-
71
+ async: false,
78
72
 
73
+ data: {
74
+
75
+ 'action':'get_obj',
76
+
77
+ },
78
+
79
+ success: function( response ){
80
+
81
+ console.log('成功');
82
+
79
- }
83
+ }
84
+
85
+ });
86
+
87
+ }
88
+
89
+ });
80
90
 
81
91
  ```
82
92
 

1

記述ミス

2020/03/04 02:22

投稿

u-sukesan
u-sukesan

スコア156

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
  ```ここに言語を入力
50
50
 
51
- function ajax_form(req,param){
51
+ function ajax_form(){
52
52
 
53
53
  $.ajax({
54
54