gpt4 book ai didi

javascript - EL 中 window.location.href 的同义词 - 获取当前 URL

转载 作者:行者123 更新时间:2023-11-28 07:00:33 25 4
gpt4 key购买 nike

我需要获取当前 URL(在 javascript window.location.href 中)以获取我的 <spring:param> 的值(在创建返回 URL 的上下文中)。对于参数的值我必须使用表达式语言。这可能吗,或者你有什么建议?谢谢各位的解答!

最佳答案

I need to get current URL (in javascript window.location.href)

可通过 HttpServletRequest#getRequestURL() 获取.

因此,在 EL 中只需 ${pageContext.request.requestURL}

关于javascript - EL 中 window.location.href 的同义词 - 获取当前 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32177796/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com