Sunshine_sky
2016-08-30 15:25
<!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谢谢
是onclick 你掉了c
遇到这种情况就会发现,代码提示是有多重要
这事儿我跟你有同感,哎,少还好,多了就惨了
JavaScript进阶篇
469062 学习 · 22582 问题
相似问题