输出

Result:

示例代码

This is the test for the feature of "Value sanitization" in Forms field "input" whose type is "range".

HTML :

  <script>
    function output() {
      var c = document.getElementById("dt");
      if(c.value == "")
        document.getElementById
('result').textContent = "";
      else
        document.getElementById
('result').textContent = c.value;
      return false;
    }
  </script>
  <form>
    <input type="range" id="dt" />
    <input type="button" value="submit" onClick="output()"/>
  </form>
  <p>Result:<output id="result"></output></p>