如何从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>热门推荐
6 初八的祝福语简短
10 年底拜年祝福语大全简短
11 生日祝福语简短明了 同事
12 送给情侣贺卡祝福语简短
13 宝宝100日简短祝福语
14 简短祝福语中考女孩的话
15 道教生日祝福语简短大全
16 学生毕业季祝福语简短
17 结婚祝福语亲姐姐简短
18 小红书生日祝福语简短