实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js">
5
</script>
6
<script>
7
$(document).ready(function(){
8
  $("img").load(function(){
9
    $("div").text("Image loaded");
10
  });
11
});
12
</script>
13
</head>
14
<body>
15
16
<img src="img_moustiers-sainte-marie.jpg" alt="Cinqueterra" width="304" height="236">
17
<div>Image is currently loading.</div>
18
<p><b>Note:</b> Depending on the browser, the load event may not trigger if the image is cached.</p>
19
20
</body>
21
</html>