enter image description here

made filling value input[search] via <?php echo $search; ?> <?php echo $search; ?> problem is that the search is performed on.("keyup") and because of this, when the page loads, nothing happens only if you hover the cursor and press any button.

How to make it so that when the page loads, the search is immediately activated?

  • Take out the search algorithm in a separate function and call it when the page loads or onkeyup - Alexey Shimansky

1 answer 1

try this

 window.onload = function () { alert('Your code here'); };