Want to open a html to initialize an id to its url

like this
clipboard.png
:

clipboard.png
but the problem is that it keeps refreshing when the page is opened. I don"t know if my method is wrong. I ask the bosses to take a look at it for me. Window.location.href has also tried, but it still doesn"t work

.
Mar.16,2021

you write this directly, of course, it keeps refreshing, because every time you modify window.location.search, the page reloads, and then you execute this statement, so it loads again. So you should add a logical judgment, for example, if you already have an id parameter, do not execute the statement that modifies window.location. That would be fine.

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