valueAsNumber-prop.html 583 B

123456789101112131415161718
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <!-- Test: when changing the 'value' IDL property, the thumb of the range
  4. should be moved to the appropriate position -->
  5. <script type="text/javascript">
  6. function setValue()
  7. {
  8. document.getElementById('i').valueAsNumber = 75;
  9. document.documentElement.className = '';
  10. }
  11. document.addEventListener("MozReftestInvalidate", setValue);
  12. setTimeout(setValue, 2000); // useful when not running under reftest suite
  13. </script>
  14. <body>
  15. <input type=range id='i' value=50 step=25>
  16. </body>
  17. </html>