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# - SharpSVN - How to get the previous revision? -

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

url - Querystring manipulation of email Address in PHP -