Html 占位符在firefox中工作不正常

Html 占位符在firefox中工作不正常,html,css,firefox,placeholder,Html,Css,Firefox,Placeholder,我知道旧版firefox不支持占位符。但我的firefox是最新的,我可以在这个页面上看到占位符:。但是当我打开代码时,我看不到占位符。如果我使用chrome或IE,我的会显示出来 <form id="Signup"> <input type="text" placeholder="username" id='name' size="15px"><br> <input type="password" placeho

我知道旧版firefox不支持占位符。但我的firefox是最新的,我可以在这个页面上看到占位符:。但是当我打开代码时,我看不到占位符。如果我使用chrome或IE,我的会显示出来

    <form id="Signup">
        <input type="text" placeholder="username" id='name' size="15px"><br>
        <input type="password" placeholder="password" id='pw' size="10px"><br>
         <input type="password" placeholder="retype-password" id='confirmPw' size="10px"><br>
        <input type="text" placeholder="email" id='email' size="10px"><br>






如果您想要JS解决方案,它将覆盖所有浏览器

<input name="username" type="text" value="Username" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">