0
点赞
收藏
分享

微信扫一扫

js页面重绘


js页面重绘_bc

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <embed src="九张机.mp3" hidden="true" autostart="true" loop="true"/>
</head>
<body>
<button>点击</button>
<p>abc</p>
<script>
    //document.write()  文档加载完后调用会引发页面重绘
    var btn=document.querySelector('button');
    btn.onclick=function(){
        document.write('<div>123</div>');
    }
    //element.innerHTML=
    //doclument.createElement().

</script>
</body>
</html>


举报

相关推荐

0 条评论