如何更改区域背景颜色? (Oracle Apex 21.1)
当用户单击按钮时,我可以更改背景颜色吗?
按下该按钮(P21_CHECKOUT_BUTTON)
被按下,执行一个将状态更改为ON或ON ON或OFF的过程。
目前,我想更改区域(p21_checkout)
颜色,on:white off:yellow。
我找到了旧问题,但它仅起作用的JavaScript。 将背景color更改为Apex Oracle中的按钮
无法为新版本提供最佳解决方案,然后在运行PL/SQL时使用此JavaScript将值设置为项目。 以上问题有点老式。 (但是足够好。)
有人可以给我答案吗? 先感谢您 :)
May I change the background color when a user clicks a button?
When that button (P21_CHECKOUT_BUTTON)
is pressed, execute a process that changes the status OFF to ON or ON to OFF.
At this time, I want to change region (P21_CHECKOUT)
color, ON: White OFF: YELLOW.
I found old question, but it is working only javascript.
Change Background-color to button in APEX Oracle
If there is no way to best solution for newer versions, then use this javascript to set the value to the item when you run PL/SQL.
The above question feel a bit old-fashioned. (but enough good.)
Can someone please give me an answer?
Thank you in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题中的链接使用jQuery来操纵DOM元素并设置背景颜色。这可能会起作用,但绝对不是升级证明。它也可以在Apex发表声明,随着时间的流逝,这要安全得多。
这是设置区域单击按钮的背景颜色的示例。可以应用相同的技术来为您的过程添加/删除背景颜色类:
页面有一个按钮(按钮1),一个区域(region1)
这就是其中的全部。类“ U-Color-7-BG”类来自通用主题参考应用程序(Apex Universal主题>参考> color and Status修饰符)。可以使用块/文本/背景/边框的许多预定义类。这些都是升级的证明,强烈建议将它们用于家庭啤酒解决方案
The link in the question uses jquery to manipulate the DOM element and set the background color. This could work but it definitely is not upgrade proof. It can be achieved declaratively in apex as well and that is a lot safer over time.
Here is an example of setting background color of a region click of a button. The same technique can be applied to add/remove the background color class for your process:
Page has a button (BUTTON1) and a region (REGION1)
That's all there is to it. The class "u-color-7-bg" comes from the universal theme reference application (Apex Universal Theme > Reference > Color and status modifiers). There are a number of predefined classes for block/text/background/border that can be used. These are upgrade proof and it is strongly advised to use these over home brewn solutions