Of course, we can get the value of the parameter in the background, and then get the value of the variable in the front-end js code. For specific methods, please refer to my article: JavaScript gets the background C# variable and calls the background method.
In fact, we can also directly get the value of the request parameter in js. By using window.location.search, we can get the string starting with the ? number of the current URL. For example, the search obtained from the previous link is ?id=001. Then process the obtained string to get the value of the parameter.