开发者

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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜