Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有向 TextArea 添加验证以阻止用户输入换行符(基本上阻止他们按“Enter”)?
猜猜这有帮助:
<textarea onkeydown="if(event.keyCode == 13) return false;"></textarea>