0

我想在 Apex 5 的“选择列表”项目的 LOV(值列表)中使用图像

在此处输入图像描述

按照这个线程 https://community.oracle.com/thread/3969943

我可以更改列表元素的背景颜色,将此代码添加到 Element>Properties>Advanced>Post Text:

<script type="text/javascript">
    document.getElementById("ElementId")[3].style.backgroundColor= 'cyan';
</script>

但是当尝试设置图像时,什么也没有发生

<script type="text/javascript">
    document.getElementById("ElementId")[3].style.backgroundImage= "imageUrl";
</script>

设置图像的正确方法是什么?

4

1 回答 1

1

您的代码看起来不错,但 IE 不支持图像,所以如果这是您使用的浏览器,这就是问题所在。它将在 Firefox 中运行。

于 2017-11-21T11:30:18.887 回答