¡@

Home 

2014/10/16 ¤W¤È 12:03:06

jquery Programming Glossary: editabletext

How do I make a div element editable (like a textarea when I click it)?

http://stackoverflow.com/questions/2441565/how-do-i-make-a-div-element-editable-like-a-textarea-when-i-click-it

of them is to dynamically create a textarea on the fly var editableText textarea and replace it with the div #myDiv .replaceWith editableText.. textarea and replace it with the div #myDiv .replaceWith editableText The textarea is in place now. But it is empty and we have just.. div var divHtml #myDiv .html create a dynamic textarea var editableText textarea fill the textarea with the div's text editableText.val..

How do I make a div element editable (like a textarea when I click it)?

http://stackoverflow.com/questions/2441565/how-do-i-make-a-div-element-editable-like-a-textarea-when-i-click-it

do we get the textarea. There are various ways but one of them is to dynamically create a textarea on the fly var editableText textarea and replace it with the div #myDiv .replaceWith editableText The textarea is in place now. But it is empty and.. to dynamically create a textarea on the fly var editableText textarea and replace it with the div #myDiv .replaceWith editableText The textarea is in place now. But it is empty and we have just replaced the div and lost everything. So we need to preserve.. the work upto this point we get save the html within the div var divHtml #myDiv .html create a dynamic textarea var editableText textarea fill the textarea with the div's text editableText.val divHtml replace the div with the textarea #myDiv .replaceWith..