search

Home  >  Q&A  >  body text

html - 为什么 input 标签设置了 type="password" 后,输入密码仍是文本而不是星号?

<input tpye="password" id="form_passwd" name="form_password" class="inp" placeholder="密码">

上面的代码在输入的时候,应该显示「********」,但我本地测试的时候,仍然是直接显示输入文字,为什么会这样?

http://www.w3school.com.cn/tiy/t.asp?f=html5_input_type_password

这个例子里是正确显示的,难道是因为在本地测试吗?

黄舟黄舟2866 days ago920

reply all(6)I'll reply

  • 迷茫

    迷茫2017-04-17 11:41:18

    type is not tpye....

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:41:18

    This is how you should solve the problem:
    1. Try your best to check your code to see if there are any low-level errors;

    2. Google (you must know this, it is a basic skill...)

    3. If you really can’t find the error, ask your friends and colleagues around you (sometimes you can’t see the error yourself for a long time, they may see it at a glance)

    4. Go to relevant websites to ask questions, such as stackoverflow, segmentfault, etc.

    Only in this way can you improve faster. . .

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:41:18

    Sexy year! You misspelled the word. . . It’s type, not tye...

    reply
    0
  • 阿神

    阿神2017-04-17 11:41:18

    type....

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 11:41:18

    ...type

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:41:18

    It is recommended that you change to an IDE with spell checking, such as PHPStorm, otherwise you will encounter this bug again in the future.

    reply
    0
  • Cancelreply