[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] 閒置登出作法

[JavaScript] 將array object 根據值重新 js format的作法