為什么他不能彈出鼠標經過事件的對話框
<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>?鼠標經過事件?</title>
<script?type="text/javascript">
????function?message(){
??????confirm("請輸入密碼后,再單擊確定!");?}
</script>
</head>
<body>
<form>
密碼:<input?name="password"?type="password"?>
<input?name="確定"?type="button"?value="確定"?onmouseover="massage()"/>
</form>
</body>
</html>
2015-12-15
message ?這個方法名寫錯了,定義和調用兩個地方寫的不一樣
<!DOCTYPE?HTML> <html> <head> ????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> ????<title>?鼠標經過事件?</title> ????<script?type="text/javascript"> ????????function?message(){ ????????????confirm("請輸入密碼后,再單擊確定!");?} ????</script> </head> <body> <form> ????密碼:<input?name="password"?type="password"?> ????<input?name="確定"?type="button"?value="確定"?onmouseover="message()"/> </form> </body> </html>2016-03-26
我也經常犯這種錯誤的額
2015-12-15
樓上正解
2015-12-15
message和massage不對應,你拼錯單詞了