我一直在尝试运行一个简单的加载事件代码。但是它没有任何反应。
我已经在这里放置了我的代码。请提出建议解决方案。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>jQuery tutorial</title>
<script>
//load example
$('iframe').load(function() {
alert('Your iframe just loaded!');
});
</script>
<style type="text/css">
li {
font-size: 1.4em;
line-height: 50px;
}
</style>
</head>
<body>
<li> Load Event </li>
<iframe src="https://www.w3schools.com/jquery/jquery_events.asp" width="400" height="400"></iframe>
</body>
</html>