1>響應mouseover事件, 彈出對話框“mouse over!”2>響應mouseout事件, 彈出對話框”mouse out!”<html><head><script type="text/javascript">::</script></head> <body><a href="./test1.html" target="_blank"><img border="0" alt="Cannot show this pic." src=./a.jpg" name="pic1"onmouseOver="mouseOver()"onmouseOut="mouseOut()" /></a></body></html>
1 回答

牛魔王的故事
TA貢獻1830條經驗 獲得超3個贊
你的寫法基本都是對的,現在只需有用javascript定義兩個事件處理函數,并且加上彈出對話框代碼就可以了。
<html><head>
<script
type="text/javascript">
function
mouseOver()
{
alert("mouse
over");
}
function
mouseOut()
{
alert("mouse
out");
}
</script>
</head>
<body>
<a
href="./test1.html"
target="_blank"><img
border="0"
alt="Cannot
show
this
pic."
src=./a.jpg"
name="pic1"
onmouseOver="mouseOver()"
onmouseOut="mouseOut()"
/></a>
</body></html>
添加回答
舉報
0/150
提交
取消