placeholder-22.html 620 B

1234567891011121314151617181920212223
  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. <body onload="focusPlaceholder();">
  19. <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="setPlaceholder(); disableReftestWait();">
  20. </body>
  21. </html>