This should be a simple question but I have hard time finding why the issue happens.
I have the following code:
<html>
<Head>
</Head>
<Body>
<textarea id="rrr" rows="5" cols="40" maxlenght="50" onmouseup="myfunction()"></textarea>
<script>
function myfunction(){
document.getElementById("rrr").innerHTML="test";
}
</script>
</Body>
</html>
This code works only once! when I load the page and do a mouseup on textarea, i will see the word "test".
Then I delete the textarea's text and click on it again and nothing happens. Why?