您的位置:首页 > Web前端 > JavaScript

js使得数据延时加载实例

2013-12-26 18:21 399 查看
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
</head>
<body>
<body onLoad="abc();">
<div id="guangg1">hello,worldis so white</div>
<div id="ggad1" >
<img src='abc.bmp'>
</div>
<div id="guangg2">hello,worldis so white</div>
<div id="ggad2" >
<img src='abc.bmp'>
</div>

<script type="text/javascript">
$(function() {
$("img").attr("src","");
});
function abc()
{
$(function() {
setTimeout('def()',1000);
});
}

function def()
{
$("img").attr("src","a.bmp");
}
</script>

</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: