Input input box, lowercase to uppercase, use keyup, but when the mouse moves in the middle, after entering one, the cursor automatically jumps to the back.

input input box, lowercase to uppercase, use keyup, but when you move the mouse in the middle, after entering one, the cursor automatically jumps to the end

<input name="htmer" type="text" onkeyup="this.value=this.value.toUpperCase()" />

could you tell me how to solve this?

Mar.17,2022

this is because the onkeyup () event is triggered by releasing the button

if you solve the problem, you can change it to onchange ()

.

reference link: onchange event

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b986-2c2b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b986-2c2b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?