引导表单助手电话将无法正常工作 [英] bootstrap form helper phone wont work

查看:103
本文介绍了引导表单助手电话将无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用表单Bootstrap框架创建网站.作为我的代码的一部分,

I m trying to make a website using form Bootstrap framework. As part of my code I have

<div class="control-group">
<label class="control-label" for="inputTell">Telephone</label>
<div class="controls">
<input type="text" id="inputTell" class="bfh-phone" data-format="(ddd) ddd-dddd">
</div>
</div>

这是图片:

不应该那样.它不应该接受任何字符串,应该给我这样的电话格式:

It shouldnt be like that. It shouldn't accept any strings and it should give me the phone format like this:

我的目录中已经有必要的JS文件,但是我不确定为什么它不起作用.

I already have the necessary JS files in my directory but I am not sure why it is not working.

推荐答案

确保输入字段在表单内.否则,电话助手将无法正常工作.

Make sure the input field is inside a form. The phone helper will not work correctly otherwise.

<form>
  <div class="control-group">
    <label class="control-label" for="inputTell">Telephone</label>
    <div class="controls">
      <input type="text" id="inputTell" class="bfh-phone" data-format="(ddd) ddd-dddd">
    </div>
  </div>
</form>

示例 jsfiddle

这篇关于引导表单助手电话将无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆