写上<br>为什么会有红色波浪线提示错误,但是能正常显示结果呢?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="ys"></div>
<script src="https://unpkg.com/art-template@4.13.2/lib/template-web.js"></script>
<script id="tpl-1">
{{value}}
<br>
{{key.data}}
<br>
{{key}}
</script>
<script>
const ys=document.getElementById('ys');
ys.innerHTML=template('tpl-1',{
value:1,
key:{
data:2
}
})
</script>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星