placeholder-22.html (620B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <!-- Test: when focused, clearing placeholder attribute should work. --> 4 <script type="text/javascript"> 5 function focusPlaceholder() 6 { 7 document.getElementById('p1').focus(); 8 } 9 function setPlaceholder() 10 { 11 document.getElementById('p1').placeholder = ''; 12 } 13 function disableReftestWait() 14 { 15 document.documentElement.className = ''; 16 } 17 </script> 18 19 <body onload="focusPlaceholder();"> 20 <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="setPlaceholder(); disableReftestWait();"> 21 </body> 22 </html>