HTML 延迟加载显示

html-css018

HTML 延迟加载显示,第1张

HTML 延迟加载显示

<div id="vodid1">第一个按钮直接显示</div>

<input type="submit" value=""  style="width: 1pxheight: 1pxbackground-color: transparentborder: 0FILTER: alpha(opacity=0)" />

间隔线来咯---------------------

<div id="vodid2">第二个按钮/图片,延迟加载显示</div>//广告位置,想延迟加载

    <script type="text/javascript">

        var html="<img src='http://static.cnblogs.com/images/logo_small.gif'/>"

        setTimeout("document.getElementById('vodid2').innerHTML=html",5000)//延时5秒

    </script>

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

</head>

<body>

<div id="main"></div>

<script>

var body = document.getElementById('main')

function addElement(){

body.innerHTML = '<video width="1281" height="720" controls="controls" autoplay="autoplay" class="pos_abs"><source src="57742213.mp4" type="video/mp4" /></video>'

}

setTimeout("addElement()",3000)

</script>

</body>

</html>