javascript 表单的友好用户体现

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

javascript 表单的友好用户体现

  2020-05-12 我要评论
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>test</title>
<script language="javascript" type="text/javascript">
function validateLength(obj)
{
return obj.value.length < obj.getAttribute("maxlength");
}
</script>
</head>
<body>
<label for="userName">用户名:</label>
<input id="userName" type="text" maxlength="10" onmouseover="this.focus();" onfocus="this.select();" /><br /><br />

<label for="passWord">密码 :</label>
<input id="passWord" type="password" onmouseover="this.focus();" onfocus="this.select();" /><br /><br />

<label for="remark">备注 :</label>
<textarea id="remark" onkeypress="return validateLength(this);" onmouseover="this.focus();" onfocus="this.select();" maxlength="50" cols="50" rows="5"></textarea>
</body>
</html>

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们