| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <title>Forms</title> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <p> |
| <h3>input_stepDown</h3> |
| </p> |
| |
| <hr> |
| |
| <div id="log"></div> |
| |
| <form method="post" |
| enctype="application/x-www-form-urlencoded" |
| action="" |
| name="input_form"> |
| <p><input type='number' id='input_number'></p> |
| </form> |
| |
| <script> |
| var input_number = document.getElementById("input_number"); |
| input_number.max = "30"; |
| input_number.step = "3"; |
| input_number.value = "30"; |
| input_number.stepDown(5); |
| |
| if (typeof(input_number.stepDown) == "function") { |
| test(function() { |
| assert_equals(input_number.value, "15", "call of stepDown method is failed."); |
| }); |
| } else { |
| test(function() { |
| assert_unreached("stepDown attribute is not exist."); |
| }); |
| } |
| |
| </script> |
| |
| </body> |
| </html> |