APIHTMLElement

HTMLInputElement

  • toTextBox
  • toPasswordBox
  • togglePassword
  • setNoChanges
  • isModified
  • val
  • toTextBox

    .toTextBox()

    Transform a <input type="password" /> in <input type="text" /> to see password

    <input type="password" id="el" value="secret" /> <script> var el = qsi("el"); el.toTextBox(); </script>

    toPasswordBox

    .toPasswordBox()

    Transform a <input type="text" /> in <input type="password" /> to hide password

    <input type="text" id="el" value="secret" /> <script> var el = qsi("el"); el.toPasswordBox(); </script>

    togglePassword

    .togglePassword()

    Transform a <input type="text" /> in <input type="password" /> or vice versa to show/hide password

    <input type="text" id="el" value="secret" /> <script> var el = qsi("el"); el.togglePassword(); </script>

    setNoChanges

    .setNoChanges()

    Indicate that the input element is not modified

    <input type="text" id="el" value="secret" /> <script> var el = qsi("el"); el.setNoChanges(); </script>

    isModified

    .isModified()

    Indicate if the input is modified or not

    <input type="text" id="el" value="123456" /> <script> var el = qsi("el"); var ret = el.isModified(); </script>

    val

    .val( [value] )

    valueIf Specified, set the input to the value or return the value or the input

    set the input to the value or return the value or the input

    <input type="text" id="el" value="123456" /> <script> var el = qsi("el"); var ret = el.val(); // 123456 el.val("789"); ret = el.val(); // 789 </script>