आउटलाइन कलर सेट करने के लिए, जावास्क्रिप्ट में outlineColor प्रॉपर्टी का उपयोग करें। outlineColor प्रॉपर्टी लागू करना सीखने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <head> <style> #box { border: 2px solid red; } </style> </head> <body> <div id = "box"> डेमो कंटेंट </div> <br> <button type = "button" onclick = "display()">आउटलाइन कलर बदलें</button> <script> function display() { document.getElementById("box").style.outlineColor = "#FF5733"; document.getElementById("box").style.outline = "2px solid"; } </script> </body> </html>