Window.location assigns a value to kneel down and ask for expert advice.

<script language="javascript" type="text/javascript">
window.setTimeout("window.location="http://qm.qq.com/cgi-bin/qm/qr?k=9KrO6yND1ExuTWJ6alGDdcC803nywUi9"",1000);
</script>

I wrote this on a separate HTMLJS page. I want to assign values at any time through another HMTL page. I can only order PHP. Ask for a code.
if there is a simpler way, please give me some guidance.

Nov.24,2021

setTimeout requires the argument to be a function, not a string
try this

window.setTimeout(function(){window.location='http://qm.qq.com/cgi-bin/qm/qr?k=9KrO6yND1ExuTWJ6alGDdcC803nywUi9'},1000);

you can use localStorage instead of passing values on the page.

Settings page

</button>
    <script>
        var btn = document.getElementById('btn')
        btn.onclick = function() {
            var url = localStorage.getItem('url')
            window.location=url
            localStorage.setItem('url','')
        }
    </script>
</body>
</html>
Menu