0
對於我的一些佔位符,我使用的是span.js,這很好,但有一個問題。在IE9中,當您對焦輸入時,它會在右側顯示x圖標,聚焦後,只有當我點擊x圖標時才能看到我的佔位符。我想使它作爲佔位符工作 - 當沒有值佔位符需要顯示時,即使我沒有在IE中單擊x。即使未在IE9上點擊x,也顯示佔位符
這裏是我的代碼:
<div class="fieldWrap">
<label for="mobile_number">Mobile Number</label>
<div class="intl-tel-input">
<input name="Mobile Number" id="mobile_number" type="text" placeholder="Mobile Number" autocomplete="off">
</div>
<span style="margin: 0px; padding: 0px; left: 48px; top: 16px; display: block; position: absolute; z-index: 100000; cursor: text; background-color: transparent;">Mobile Number</span>
</div>
這是一個IE9的事情。看看這個問題:[鏈接](http://stackoverflow.com/questions/6366021/placeholder-in-ie9) – Reptar