javascript - Change innerHTML doesn't work -


well have code:

<script>  function changeinner(id, inner) {  document.getelementbyid(id).innerhtml = "<textarea>" + inner + "</textarea>" }  </script>  <span id="edit" onlick="javascript:changeinner('edit', 'more text in textarea!');">some text!</span> 

why doesn't work? it's simple, , doesn't work, don't know why...

you have typo in html markup. changing onlick onclick makes work.

<span id="edit" onclick="... 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -