28,391
社区成员
发帖
与我相关
我的任务
分享
<body>
<form id="form1" name="form1" method="post" action="dlyz.asp">
<table width="400" border="0">
<caption>
客户登录
</caption>
<tr>
<td width="195"><div align="right">姓名</div></td>
<td width="195"><label for="t1"></label>
<input type="text" name="t1" id="t1" /></td>
</tr>
<tr>
<td><div align="right">密码</div></td>
<td><label for="t2"></label>
<input type="password" name="t2" id="t2" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="bt1" type="button" id="bt1" onclick="yz()" value="登录" />
<input type="reset" name="bt2" id="bt2" value="重置" /></td>
</tr>
</table>
</form>
<script src="layui/layui.all.js"></script>
<script>
function yz(){
var t1 = document.getElementById("t1");
if(t1.value==""){
alert("昵称不能空");
t1.focus();
return;
}
}
</script>
</body>