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

sql - text truncated using perl DBI insert -

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

php - Pass object by reference or value -