const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const cbid = urlParams.get('cbid'); document.getElementById("cbid").value = cbid; const workerID = urlParams.get('workerID'); document.getElementById("workerID").value = workerID; function test(){ window.parent.location = "http://192.168.20.133:8080/PHP/forms/DTC.html"; }