【问题标题】:What replaces input type=email with just user name text field?什么将 input type=email 替换为仅用户名文本字段?
【发布时间】:2014-02-11 22:56:39
【问题描述】:

我不知道这个验证是从哪里来的。我相信它来自BootStrap。这对我来说都很好。

但我的输入类型不是email,它只是username。我只想显示相同的验证弹出窗口,如password 验证。喜欢Please fill out this field

那么What input type I have to use for username textbox to get show same validation popup?

 <input type="email" class="form-control" placeholder="User name" required="" autofocus="">
 <input type="password" class="form-control" placeholder="Password" required="">
 <label class="checkbox">
   <input type="checkbox" value="remember-me"> Remember me
 </label>
 <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>

【问题讨论】:

  • 我现在感觉真的老了:(&lt;crochety-old-man-voice&gt;回到我的时代,我们只有种输入类型!&lt;/crochety-old-man-voice&gt;

标签: jquery jquery-ui twitter-bootstrap


【解决方案1】:

我认为这就是您所说的:

<input type="email" class="form-control" placeholder="User name" required="" autofocus="">

由于您已经拥有required="",您只需将type="email" 更改为type="text"

<input type="text" class="form-control" placeholder="User name" required="" autofocus="">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-02-06
    • 1970-01-01
    • 1970-01-01
    • 2023-01-02
    • 2012-10-09
    • 2015-05-14
    • 1970-01-01
    相关资源
    最近更新 更多