jQuery to store initial value of textarea

In the script below, I want to keep the initial value of htmlStrTOCpre static so that it does not change. However, once I edit the text area, the undo will no longer paste the original text back into the textarea. I believe its because the htmlStrTOCpre is based on the html() of textarea at the time the undoTOC function is called, and not the initial value on page load. How can I store that initial value, so that I can always paste it back into the textarea (via the undoTOC function)?

Table of Contents

Paste TOC | Undo


以上就是jQuery to store initial value of textarea的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准