<script type="text/javascript">
function getData() {
let result = fetch('http://127.0.0.1:8080/order/orderPrintLx', {
headers: {
'Accept': 'application/json, text/plain, */*'
}
})
result.then(res => {
return res.text()
}).then(data => {
document.getElementById('box1').innerHTML = data
}).catch(e => {
console.log('Catch Error:', e)
}).then(() => {
getData()
})
}
getData()
</script>
js实时请求方法
最新推荐文章于 2022-03-26 16:15:40 发布