javascript - How to save a textarea as a text file -


im trying make own software similar microsoft word html. have textarea , enter text , save it. problem is, when saved computer test out everytime reset textarea. had button did javascript alert box telling press "ctrl+s" save file, said resets textarea. there differnt tag other textarea tag, or need differnt method of savind file. if have code suggestions please share me, thanks! here code:

 textarea {     background-color: #e6e6e6;     }      </style> </head> <body>     <div class="container">         <div class="jumbotron">              </h1>             </div>         </div>         </div>           <button onclick="myfunction()">               <noscript>                 <b> press ctrl+s , name (---------).html </b>             </noscript>save         </button>            <script>       function myfunction() {       alert("to save press ctrl+s , name (---------).html ");       }         </script> 

if press ctrl+s in browser window, browser save original html came server (here local computer). in case html not contain text, it's not saved.

if you'd save entered text, you'll have make separate function include textarea content in html.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -