execCommand

샘플코드

  1.  <script language=javascript>
    function doSaveAs() {
      if (document.execCommand) {
        document.execCommand("SaveAs")
      }
      else {
        alert("Save-feature available only in Internet Exlorer 5.x.")
      }
    }
    </script>
  2. <form>
    <input type="button" value="save" onClick="doSaveAs()">
    </form>

 

명령어

 Command Identifiers