我正在通过jquery ajax加载事件加载页面。
“正在加载”页面包含正在通过延迟加载加载但图像未显示的图像
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#page1").click(function() {
$("#div1").load("1.html");
});
})
</script>
</head>
<body>
<a href="#" id="page1">Page1</a>
<div id="div1"></div>
</body>
</html>
正在加载页面
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.min.js"></script>
<script>
$(document).ready(function() {
$('.lazy').Lazy({});
});
</script>
<style>
img {
width: 100%;
}
</style>
</head>
<body>
<img class="lazy" data-src="K1_1.jpg">
</body>
</html>