[Anular Material] 輸入自動轉成大寫




在HTML的input 標籤內加上

oninput="this.value = this.value.toUpperCase()"


引用

https://stackoverflow.com/questions/50446592/typescript-html-how-to-force-uppercase-in-an-input-field/50447152
You can simply add oninput="this.value = this.value.toUpperCase()" in your <input> tag and it will instantly convert any input in your input field to Uppercase.











































留言

這個網誌中的熱門文章

[Angular] Checkbox篩選元素作法留存 (配reactive form)

[Telegram Bot] 開發回聲機器人程式碼暫存

[Angular Material] 搜尋式下拉選單範例