placeholder-20.html 681 B

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