如何从onmouseover事件中调用JavaScript函数?
将鼠标移到任何元素上时,会触发onmouseover事件。
示例
您可以尝试运行以下示例,以了解如何从onmouseover事件调用JavaScript函数
<html>
<head>
<script>
<!--
function over() {
document.write ("Mouse Over");
}
function out() {
document.write ("Mouse Out");
}
//-->
</script>
</head>
<body>
<p>Bring your mouse inside the division to see the result:</p>
<div onmouseover="over()" onmouseout="out()">
<h2> This is inside the division </h2>
</div>
</body>
</html>热门推荐
10 离职送别文案祝福语简短
11 端午送老师祝福语简短
12 旅游祝福语简短老师发言
13 爸爸生日的祝福语简短
14 学校校长新年祝福语简短
15 祝福语简短的微信
16 写春节祝福语简短的
17 晚辈给长辈祝福语简短
18 对情侣朋友祝福语简短