这是我的代码。我不明白为什么资源管理器中没有显示占位符。请帮忙。
HTML 代码
<form method="post" >
<input type="text" class="field" name="nom" placeholder="Votre Nom">
<input type="text" class="field" name="telephone" placeholder="Téléphone">
<center><input type="submit" id="submit_btn" value="Valider" class="btn_submit"></center>
</form>
最佳答案
尝试 OnFocus 而不是使用占位符它会起作用
<input name="nom" type="text" value="Votre Nom" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
告诉我它是否有效
关于html - 占位符值未显示在 chrome 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27287143/