qq_慕虎8015442
2019-12-05 14:56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<span id="r">5</span>
<body>
<script type="text/javascript">
var i =document.getElementById("r");
setTimeout(i.innerHTML="4",3000);
</script>
</body>
</html>
代码外加双引号
var i = document.getElementById("r"); setTimeout("i.innerHTML = 4", 3000);
JavaScript进阶篇
468191 学习 · 21891 问题
相似问题