如何在 Oracle APEX 中使用多个数据 ID?
How to use multiple data-id in Oracle APEX?
我在 ID 列 html 表达式中设置数据 ID,例如:
数据ID=&ID。 - 它有效。
但是,我如何设置 data-id=&LAST_NAME。在同一报告中并在 JavaScript?
中使用该数据 ID
通常您将 class 添加到与数据属性相同的 html 标记,例如 class="myclass"
。然后在单击 jquery 选择器 .myclass
时添加动态操作。在 javascript 中,然后使用表达式 this.triggeringElement.dataset['id']
引用 data-id
的值 - 这可以在“设置值”类型的操作中使用,以将页面项目值设置为 data-id
单击行的属性。
请注意,它不一定是“data-id”。可以使用“data-whateveryou want”。所以你会有一个“data-empno”,一个“data-ename”和一个“data-deptno”,都在同一个 html 标签中。还解释了here
当您使用:示例
01. use the class="myClassName"
02. add dynamic action on click of jquery selector .myClassName
03. set the page item value of multiple data attribute with js expression
$(this.triggeringElement).data('id');
$(this.triggeringElement).data('last_name');
我在 ID 列 html 表达式中设置数据 ID,例如: 数据ID=&ID。 - 它有效。 但是,我如何设置 data-id=&LAST_NAME。在同一报告中并在 JavaScript?
中使用该数据 ID通常您将 class 添加到与数据属性相同的 html 标记,例如 class="myclass"
。然后在单击 jquery 选择器 .myclass
时添加动态操作。在 javascript 中,然后使用表达式 this.triggeringElement.dataset['id']
引用 data-id
的值 - 这可以在“设置值”类型的操作中使用,以将页面项目值设置为 data-id
单击行的属性。
请注意,它不一定是“data-id”。可以使用“data-whateveryou want”。所以你会有一个“data-empno”,一个“data-ename”和一个“data-deptno”,都在同一个 html 标签中。还解释了here
当您使用:示例
01. use the class="myClassName"
02. add dynamic action on click of jquery selector .myClassName
03. set the page item value of multiple data attribute with js expression
$(this.triggeringElement).data('id');
$(this.triggeringElement).data('last_name');