javascript - How to transform text to input? -


how can create such as:
- there text
- click on it
- transforms input contains text clicked on.

how this

html

<div onclick="transform(this)">some text here</div> 

javascript

function transform(obj) {     obj.innerhtml = "<input type='text' value='" + obj.innerhtml + "' />"; } 

hope i've understood question correctly.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -