If I use a GET to request a page, then I can access any query parameters from javascript using window.location.search. Is there a similar way to access query parameters which are in the request content body rather than the request location, when the page is a result of a POST?
如果我使用GET来请求页面,那么我可以使用window.location.search从javascript访问任何查询参数。当页面是POST的结果时,是否有类似的方法来访问请求内容主体中的查询参数而不是请求位置?
1 个解决方案
#1
Because the data is being handled on the server side, the client (where JS lives) has no access to these variables.
因为数据是在服务器端处理的,所以客户端(JS所在的位置)无法访问这些变量。
#1
Because the data is being handled on the server side, the client (where JS lives) has no access to these variables.
因为数据是在服务器端处理的,所以客户端(JS所在的位置)无法访问这些变量。