teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

henkou

2019/03/08 08:26

投稿

hakujam
hakujam

スコア17

title CHANGED
File without changes
body CHANGED
@@ -18,45 +18,6 @@
18
18
 
19
19
  ```html
20
20
 
21
-
22
- <script>
23
- $(function () {
24
-
25
- $('.helloClick').click(function() {
26
-
27
- alert("hello !!");
28
-
29
- });
30
-
31
- $('.AjaxhelloClick').click(function() {
32
-
33
-
34
- $.ajax({
35
- url: "/testAjax",
36
- type: "POST",
37
- dataType: "html"
38
- }).done(function(data) {
39
-
40
- //alert("ok");
41
-   $('#testInc').html(data);
42
-
43
- }).fail(function(XMLHttpRequest, textStatus, errorThrown) {
44
-
45
- alert("error");
46
-
47
- });
48
-
49
- });
50
-
51
- });
52
- </script>
53
-
54
-
55
- ・・・・・・・
56
-
57
- </head>
58
- <body>
59
-
60
21
  <div id="testInc">
61
22
 
62
23
  <div th:substituteby="common/testBtn :: test_btn"></div>
@@ -65,7 +26,6 @@
65
26
 
66
27
  <button type=button class= "AjaxhelloClick">Ajax</button>
67
28
 
68
- ・・・・・・
69
29
 
70
30
  ```
71
31
 
@@ -120,7 +80,7 @@
120
80
 
121
81
  ```
122
82
 
123
- ```ajax
83
+ ```java
124
84
 
125
85
  @RequestMapping(value="/testAjax", method=RequestMethod.POST, produces="text/plain;charset=UTF-8")
126
86
  public String testAjax() {