Archived
添加了js静态文件
This commit is contained in:
1 file changed
+10
@@ -0,0 +1,10 @@
|
|||||||
|
function request_async(){
|
||||||
|
// 使用fetch()函数进行异步请求如果服务端响应速度极慢则不会阻塞页面
|
||||||
|
fetch('/api/v1/test').then(
|
||||||
|
response => response.text()
|
||||||
|
).then(
|
||||||
|
text => {
|
||||||
|
document.getElementById('fast_test_example_text').innerText = text
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user