我正在寻找一个简单的解决方案来阻止登录表单提交空输入字段。表单的代码如下。如果可能的话,我想使用一个简单的 Javascript 解决方案。
<form id="login" method="post" action="">
<input type="text" name="email" id="email" />
<input type="password" name="pwd" id="pwd" />
<button type="submit" id="submit">Login</button>
</form>
如果可能的话,我还想更改空白字段的边框。
提前致谢。