http://jsfiddle.net/zhshqzyc/mGAPs/
내 코드에서 아주 간단한 테스트 :
<div id="generatePinsDialog" >
<label for="newCount" style="width: 400px;">
How many?</label>
<input id="newCount" type="text" size="25" placeholder="Enter the number!" />
<br />
그리고 : 코드를 수정하는
jQuery(function() {
jQuery.support.placeholder = false;
test = document.ElementById("newCount");
if('placeholder' in test) jQuery.support.placeholder = true;
});
그것은 구글 크롬에서 작동하지만 IE 9
감사합니다.
[IE9는 자리 표시 자 속성을 지원하지 않습니다.] (http://caniuse.com/input-placeholder) – Blazemonger
그러나 jsfiddle에서 보면 IE9에 텍스트가 표시되지 않습니다. –
그런 종류의 기능이 절대적으로 필요한 경우 Javascript로 수행하는 것이 현재 크로스 브라우저 호환 솔루션입니다. – gotohales