onkeypress , onkeyup are not working in textarea.
<textarea name="textarea" cols="20" rows="5" id="controller-about-information-about" onKeyDown="callname1(this.value);" onKeyPress="callname1(this.value);" onKeyUp="callname1(this.value);"></textarea>
<script>
function callname1(str) {
alert(str);
alert("this is textarea");开发者_JAVA技巧
}
</script>
If you are doing it in an XHTML document, all attribute names have to be in lowercase (see http://www.w3.org/TR/xhtml1/diffs.html#h-4.2) if you want the document to be valid. I am not sure if it makes your code "not working".
精彩评论