為啥鼠標(biāo)移開沒反應(yīng)?
<html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> <title>鼠標(biāo)移開事件?</title> <script?type="text/javascript"> ??function?message(){ ????alert("不要移開,點(diǎn)擊后進(jìn)行慕課網(wǎng)!");?} </script> </head> <body> <form> ??<a?href="http://idcbgp.cn"onmouseout="message()">點(diǎn)擊我</a> </form> </body> </html>
2016-11-26
可能是慕課網(wǎng)的問題,你自己新建一個(gè)HTML文件,然后用自己瀏覽器打開,應(yīng)該是可以的。
2016-12-01
可能是樓主瀏覽器設(shè)置成禁用腳本運(yùn)行了
2016-11-29
我把你的代碼復(fù)制到webstorm中,是正常的
2016-11-26
<a?href="http://idcbgp.cn"? onmouseout="message()">點(diǎn)擊我</a>
中間有個(gè)空格