如何从 Javascript 访问 Oracle Apex 变量?
我正在使用 Oracle APEX,但不确定如何从外部 javascript 文件访问以下变量,该文件可能位于应用程序服务器上或存储在共享组件中 ->静态文件。
:APP_ID
:APP_PAGE_ID
:APP_SESSION
如何从 javascript(存储为静态文件)引用上述每个值的值?
I'm using Oracle APEX but am unsure how to access the following variables from an external javascript file that may be located on the app server or stored in Shared Components -> Static Files.
:APP_ID
:APP_PAGE_ID
:APP_SESSION
How can I reference the values for each of the above from javascript (stored as a Static File)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些值在页面上呈现为隐藏项,如下所示:
因此您可以将它们引用为:
遗憾的是它们的命名与会话状态不同!
These values get rendered on the page as hidden items like this:
so you can reference them as:
It's a pity they aren't named the same as the session state!
从 APEX 5 开始,您还可以使用 apex.item 代替$v,如所述< a href="https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6341/index-en.html" rel="noreferrer">此处:
$v 和 apex。 item 要求在您尝试访问值时已经加载“apex”命名空间。如果您之前需要访问它们,也可以仅使用 JavaScript:
Since APEX 5 you can also use apex.item instead of $v, as described here:
Both $v and apex.item require that the "apex" namespace has already been loaded at the time you try to access the values. If you ever need to access them before that, you can also use JavaScript only instead: