SharePoint 사용자 지정 장면이 새로 생겼지 만 셀 값에 따라 SP 목록에서 셀의 배경색을 바꿀 일부 자바 스크립트를 선택했습니다.그룹화 된 SharePoint 목록에 Javascript를 적용하는 방법은 무엇입니까?
정상적인보기에서는 정상적으로 작동하지만 그룹화 된 것은 작동하지 않습니다. 이는 내가 예상 한 것이 페이지로드 순서와 관련이 있습니다. 그룹화 된 뷰에 자바 스크립트를 적용하고 기본값으로 축소되도록 설정하는 방법이 있습니까?
작년에 비슷한 쿼리로 다른 스레드를 보았지만 해결 방법이없는 것으로 보입니다.
많은 감사의 뜻 !!!
이<script type="text/javascript" language="javascript">
var x = document.getElementsByTagName("TD") // find all of the TDs
var i=0;
for (i=0;i<x.length;i++)
{
if (x[i].className=="ms-vb2") //find the TDs styled for lists
{
if (x[i].innerHTML=="Green" && x[i].cellIndex==10)
{
x[i].style.backgroundColor='forestgreen'; // set the background color
x[i].style.color='Black'; //set the font color
}
if (x[i].innerHTML=="Amber" && x[i].cellIndex==10)
{
x[i].style.backgroundColor='Goldenrod'; // set the background color
x[i].style.color='Black'; //set the font color
}
if (x[i].innerHTML=="Red" && x[i].cellIndex==10)
{
x[i].style.backgroundColor='Firebrick'; // set the background color
x[i].style.color='black'; //set the font color
}
}
}
</script>
안녕하세요, 위에서 언급 한 것처럼 저는 매우 신중하며 현재 온라인에서 발견 된 예제를 사용하고 있습니다. 제안 사항이 위의 코드에 어떻게 부합하는지 직접 보여줄 수 있습니까? 많은 감사 – user1590527