在Safari中使autocomplete =“tel-national”工作

时间:2017-05-16 07:56:58

标签: autocomplete safari autofill tel

我有一个手机字段,如果在浏览器中启用了该字段,则应自动填充。 我需要剥离国家/地区代码,只显示电话号码的其余部分。

这通常是通过autocomplete =“tel-national”实现的,这在Chrome中运行良好但我无法在Safari 10中运行。 autocomplete =“tel-country-code”或其他与tel相关的令牌也不起作用。

我还使用了这个应该是跨浏览器自动填充表单的表单,但是无法使用Safari正确填写: https://codepen.io/grigs/pen/NNVZPZ

<label for="tel-national">Telephone number without the county code</label>
  <input type="text" name="tel-national" id="tel-national" autocomplete="home tel-national">

你有什么解决方案吗?或者也许是实现相同结果的替代方案?

0 个答案:

没有答案