占位符不会出现,直到我聚焦然后取消聚焦该字段。
<input type="tel" name="natid" id="natid" class="form-control" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Hello'" required="" value="" maxlength="10" pattern="[0-9]{10}" style="width: 100%;height: 10vw;color: #000;font-weight: 400;font-size: 5vw;letter-spacing: 0.5em;">
将 placeholder="hello"
添加到您的标签。
<input type="tel" name="natid" id="natid" class="form-control" placeholder="Hello" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Hello'" required="" value="" maxlength="10" pattern="[0-9]{10}" style="width: 100%;height: 10vw;color: #000;font-weight: 400;font-size: 5vw;letter-spacing: 0.5em;">
我是一名优秀的程序员,十分优秀!