<i id='AqF2z'><tr id='AqF2z'><dt id='AqF2z'><q id='AqF2z'><span id='AqF2z'><b id='AqF2z'><form id='AqF2z'><ins id='AqF2z'></ins><ul id='AqF2z'></ul><sub id='AqF2z'></sub></form><legend id='AqF2z'></legend><bdo id='AqF2z'><pre id='AqF2z'><center id='AqF2z'></center></pre></bdo></b><th id='AqF2z'></th></span></q></dt></tr></i><div id='AqF2z'><tfoot id='AqF2z'></tfoot><dl id='AqF2z'><fieldset id='AqF2z'></fieldset></dl></div>

<small id='AqF2z'></small><noframes id='AqF2z'>

    • <bdo id='AqF2z'></bdo><ul id='AqF2z'></ul>

    <tfoot id='AqF2z'></tfoot>

      1. <legend id='AqF2z'><style id='AqF2z'><dir id='AqF2z'><q id='AqF2z'></q></dir></style></legend>

        如何使输入字段类型既是数字又是密码?

        时间:2023-10-21

          <tfoot id='Yzbbe'></tfoot>

              <tbody id='Yzbbe'></tbody>

            <small id='Yzbbe'></small><noframes id='Yzbbe'>

              <bdo id='Yzbbe'></bdo><ul id='Yzbbe'></ul>
              <legend id='Yzbbe'><style id='Yzbbe'><dir id='Yzbbe'><q id='Yzbbe'></q></dir></style></legend>
              1. <i id='Yzbbe'><tr id='Yzbbe'><dt id='Yzbbe'><q id='Yzbbe'><span id='Yzbbe'><b id='Yzbbe'><form id='Yzbbe'><ins id='Yzbbe'></ins><ul id='Yzbbe'></ul><sub id='Yzbbe'></sub></form><legend id='Yzbbe'></legend><bdo id='Yzbbe'><pre id='Yzbbe'><center id='Yzbbe'></center></pre></bdo></b><th id='Yzbbe'></th></span></q></dt></tr></i><div id='Yzbbe'><tfoot id='Yzbbe'></tfoot><dl id='Yzbbe'><fieldset id='Yzbbe'></fieldset></dl></div>
                  本文介绍了如何使输入字段类型既是数字又是密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道这一点:

                  <input type="tel">
                  

                  我知道这一点:

                  <input type="password">
                  

                  但我想同时使用两者.我希望数字键盘出现在 iOS 上(特别是),但在输入后隐藏每个字符.这样的事情可能吗?

                  But I would like to use both. I want the numeric keypad to come up on iOS (specifically) but hide each character after it's typed. Is something like this possible?

                  <input type="tel|password">
                  

                  推荐答案

                  对于 iOS,您可以将输入设置为键入密码",并且仍然使用 HTML5 属性模式"触发数字键盘:

                  For iOS you can set the input to type "password" and still trigger the numeric-keyboard using the HTML5-Attribute "pattern":

                  <input type="password" pattern="[0-9]*" ... />
                  

                  来自 Apple 文档:

                  要显示数字键盘,请将模式属性的值设置为[0-9]"或d".

                  To display a numeric keyboard, set the value of the pattern attribute to "[0-9]" or "d".

                  这篇关于如何使输入字段类型既是数字又是密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:无需 ssl 的双向密码加密 下一篇:Javascript生成具有特定字母数量的随机密码

                  相关文章

                  <legend id='s1iWI'><style id='s1iWI'><dir id='s1iWI'><q id='s1iWI'></q></dir></style></legend>

                • <tfoot id='s1iWI'></tfoot>
                    <i id='s1iWI'><tr id='s1iWI'><dt id='s1iWI'><q id='s1iWI'><span id='s1iWI'><b id='s1iWI'><form id='s1iWI'><ins id='s1iWI'></ins><ul id='s1iWI'></ul><sub id='s1iWI'></sub></form><legend id='s1iWI'></legend><bdo id='s1iWI'><pre id='s1iWI'><center id='s1iWI'></center></pre></bdo></b><th id='s1iWI'></th></span></q></dt></tr></i><div id='s1iWI'><tfoot id='s1iWI'></tfoot><dl id='s1iWI'><fieldset id='s1iWI'></fieldset></dl></div>

                    <small id='s1iWI'></small><noframes id='s1iWI'>

                      • <bdo id='s1iWI'></bdo><ul id='s1iWI'></ul>