Utilizing @Umit Can Cukadar's approach, I managed to get it functioning, although I believe the function's logic is somewhat redundant. I am willing to entertain any suggestions for simplification or brevity.
Here is my Solution:
SCRIPT
function removeBottomBorderExceptLast3(listName, listName2, listName3) {
var myOl = document.getElementById(listName).getElementsByTagName("ol");
for(var i = 0; i < myOl.length; i++) {
var myLi = document.getElementById(listName).getElementsByTagName("li");
for(var j = 0; j < myLi.length - 3; j++) {
var listItem = myLi[j];
listItem.getElementsByTagName("button")[0].style.borderBottom = "none";
}
}
var myOl2 = document.getElementById(listName2).getElementsByTagName("ol");
for(var i = 0; i < myOl2.length; i++) {
var myLi = document.getElementById(listName2).getElementsByTagName("li");
for(var j = 0; j < myLi.length - 3; j++) {
var listItem = myLi[j];
listItem.getElementsByTagName("button")[0].style.borderBottom = "none";
}
}
var myOl3 = document.getElementById(listName3).getElementsByTagName("ol");
for(var i = 0; i < myOl3.length; i++) {
var myLi = document.getElementById(listName3).getElementsByTagName("li");
for(var j = 0; j < myLi.length - 3; j++) {
var listItem = myLi[j];
listItem.getElementsByTagName("button")[0].style.borderBottom = "none";
}
}
}
BODY
<body onload="removeBottomBorderExceptLast3('myList', 'myList2', 'myList3');">
<div id="myList">
<ol style="list-style-type:none">
<li><div class="btn"><button>THIS IS BUTTON 1</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 2</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 3</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 4</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 5</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 6</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 7</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 8</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 9</button></div></li>
</ol>
</div>
<br />
<br />
<br />
<br />
<div id="myList2">
<ol style="list-style-type:none">
<li><div class="btn"><button>THIS IS BUTTON 1</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 2</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 3</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 4</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 5</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 6</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 7</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 8</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 9</button></div></li>
</ol>
</div>
<br />
<br />
<br />
<br />
<div id="myList3">
<ol style="list-style-type:none">
<li><div class="btn"><button>THIS IS BUTTON 1</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 2</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 3</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 4</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 5</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 6</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 7</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 8</button></div></li>
<li><div class="btn"><button>THIS IS BUTTON 9</button></div></li>
</ol>
</div>