How to set outline color with JavaScript?

JavascriptSAP Web DynproFront End Scripts

To set outline color, use the outlineColor property in JavaScript. You can try to run the following code to learn how to implement outlineColor property −


Live Demo

<!DOCTYPE html>
      #box {
         border: 2px solid red;
      <div id = "box">
         Demo Content
      <button type = "button" onclick = "display()">Change outline color</button>
         function display() {
            document.getElementById("box").style.outlineColor = "#FF5733";
            document.getElementById("box").style.outline = "2px solid";
Published on 27-Feb-2018 11:01:16