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
Post a Comment