you have to understand how HTTP works, 服务器端的代码 runs on the server, in different time-space, the best you can do is, submit the data from the browser to the server side, or have the server code to generate javascript code to manipulate the 浏览器窗口 object on the client side