回答編集履歴
1
調整
answer
CHANGED
@@ -9,4 +9,21 @@
|
|
9
9
|
var sc=document.createElement('script');
|
10
10
|
sc.src=API_URL;
|
11
11
|
document.querySelector('head').appendChild(sc);
|
12
|
+
```
|
13
|
+
|
14
|
+
# jQuery
|
15
|
+
|
16
|
+
```javascript
|
17
|
+
function call(jsonData) {
|
18
|
+
console.log(jsonData)
|
19
|
+
}
|
20
|
+
$(function(){
|
21
|
+
const API_URL = 'https://api.syosetu.com/novelapi/api/';
|
22
|
+
$.ajax({
|
23
|
+
url:API_URL,
|
24
|
+
type:"get",
|
25
|
+
data:{out:"jsonp",callback:"call"},
|
26
|
+
dataType:"jsonp",
|
27
|
+
});
|
28
|
+
});
|
12
29
|
```
|