手机根据格式编号

时间:2017-08-31 10:24:39

标签: html5

我想问一下如何根据这种格式制作手机:    + 6012-1234 567
   下面是我已经完成的代码...当我运行它时说按匹配请求格式...所以我的代码有什么问题?

<div class="rTableRow">
<div class="rTableCell"><label for="Phone">Phone :</label>
  </div>
 <div class="rTableHead">&nbsp; 
<input type="phone" class="form-control" id="phone" pattern="\d{3}[\-]\d{3}
[\-]\d{4}" tittle="Malaysia phone format only" placeholder="+6015-123-4567"  
 phone="phone"> 
  </div>
 </div>

1 个答案:

答案 0 :(得分:0)

<input type="number" /> or <input type="tel" /> you have added type="phone"
HTML5 Input Types
color
date 
datetime-local
email
month
number
range
search
tel
time
url
week