Input input box, when typing, there can be spaces in the middle of the text, and the spaces on both sides can be removed.

when typing in the input input box, there can be no spaces at the beginning and end, but there can be spaces in the middle of the text
.
is there any regular or other way to implement this?

Sep.07,2021

var greeting = 'Hello World!';

console.log (greeting);
/ / expected output: "Hello World!";

console.log (greeting.trim ());
/ / expected output: "Hello World!";

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-7becff-1f684.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-7becff-1f684.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?