一个input中输入值的同时,对另外一个input进行判断,按条件报错

ninjiom99 ninjiom99 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<input type="text" name="test1" id="test1" />
<input name="test2" type="text" id="test2" value="100" />
</form>
</body>
</html>


在input.test1中输入数值,离开焦点后或回车后,输入值小于test2中的值就报错。
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
ninjiom99
JavaScript 87,984 成员 224,681 内容