Question and question code do not match each other. The definition of the phone model - through which the user sits, is another You rather - how to display the parameters from the address bar.
So document.write is a very bad way to modify a document, try to output it to an element on a page: suppose the page exists
<div id="elementToModelOutput"></div>
then such a script will output the necessary parameters to it.
document.addEventListener("DOMContentLoaded", function(event) { document.getElementById("elementToModelOutput").innerHTML = getURLParameter("brand") + " " + getURLParameter("model"); });
But I note - it is not safe to output this way. the address parameter may contain a script - and the evilman, throwing such a link to the "admin" can drag off his account - XSS vulnerability.