Keydown and click call the same method, keydown does not take effect?

In the

project,
keydown judges that if it is the enter key, the function is called to perform the search.
click is a direct click to search, but
but keydown is not effective. Which god can solve the problem?
all the functions executed are the same function. It won"t work if I call the function directly, but I can use it if I put the contents of the function into keydown.

May.26,2021

guess that Enter triggered the submit, of the form

if there is only one single line input, in a form, the form will be submitted at the same time as the enter

W3
clipboard.png

Enter keydown(formaction)

keydowndemo

formonsubmitreturn false


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