鼠標單擊事件,方法不執行的問題
<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>?鼠標經過事件?</title>
<script?type="text/javascript">
????function?message(){
??????alert("測試");
??????var?val=document.getElementById("password").value;
??????alert(val);
??????if(val!=null){
??????????alert(val);
??????????confirm("成功!");
??????}else{
??????????alert("沒有值");
??????????confirm("請輸入密碼后,再單擊確定!");?
??????}
????}??
</script>
</head>
<body>
<form>
密碼:<input?name="password"?id="password"?type="password"?>
<input?name="確定"?type="button"?onlick="message()"?value="確定"/>
</form>
</body>
</html>代碼如上,我點擊確定按鈕,沒有反應,朋友幫忙看一下是什么問題.O(∩_∩)O謝謝
2016-08-30
是onclick 你掉了c
2016-08-30
遇到這種情況就會發現,代碼提示是有多重要
2016-08-30
這事兒我跟你有同感,哎,少還好,多了就慘了