如何从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 高温早安祝福语简短精辟