如何在这里添加密码限制?

来源:百度知道 编辑:UC知道 时间:2024/07/14 04:23:12
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#Layer1 {
position:absolute;
left:510px;
top:166px;
width:127px;
height:3px;
z-index:1;
}
.STYLE4 {
color: #000000;
font-weight: bold;
font-size: 12px;
}
.STYLE5 {
font-size: 12px;
font-weight: bold;
}
.STYLE9 {color: #FF0000}
-->
</style>

<script language="javascript">
function showPic(){
var i = document.form1.photo.selectedIndex;

document.all.showPhoto.src='heads/'+i+'.jpg'
//window.alert(i);
}

</script>

</head>

<body>

<script type="text/javascript">
function checkpwd(){
if (document.getElementById("pwd").value == null || document.getElementById("pwd").value == ""){
alert("Pls,enter the password!");
}
}
</script>

<body>
<input type="password" name="pwd">

<input type="button" name="aa" value="click here" onclick="checkpwd()">
</body>