admin管理员组文章数量:1426105
I have a textarea where it only allows 150 characters how do I make the focus go from the textarea to the error message after a user exceeds the maximum number of characters.
I have a textarea where it only allows 150 characters how do I make the focus go from the textarea to the error message after a user exceeds the maximum number of characters.
Share Improve this question asked Dec 9, 2010 at 15:39 AmenAmen 7134 gold badges15 silver badges28 bronze badges1 Answer
Reset to default 4You must set an identity for the element and then execute document.getElementById('elementId').focus()
.
If you have troubles with double used id's, then declare a global variable with a sequence number and increase this number (and use it as part of the element id) every time.
版权声明:本文标题:javascript - How do I place focus on an element in dojo that only has a class and not an id - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745394392a2656747.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论