觸發(fā) onmouseover
屬性事件當(dāng)鼠標(biāo)點(diǎn)在元素上時(shí)。
沒有。
<element onmouseover="script or Javascript function name">
所有HTML元素,EXCEPT:
<base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, <title>
onmouseover |
Yes | Yes | Yes | Yes | Yes |
<!DOCTYPE html>
<html>
<body>
<p id="p1" onmouseover="onmouseOver()" onmouseup="mouseUp()">
Click the text!
</p>
<script>
function onmouseOver() {
console.log("onmouseOver");
}
function mouseUp() {
console.log("up");
}
</script>
</body>
</html>
更多建議: