আউটলাইন রঙ সেট করতে, আউটলাইন কালার ব্যবহার করুন জাভাস্ক্রিপ্টে সম্পত্তি। কিভাবে outlineColor প্রয়োগ করতে হয় তা শিখতে আপনি নিম্নলিখিত কোডটি চালানোর চেষ্টা করতে পারেন সম্পত্তি -
উদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
#box {
border: 2px solid red;
}
</style>
</head>
<body>
<div id = "box">
Demo Content
</div>
<br>
<button type = "button" onclick = "display()">Change outline color</button>
<script>
function display() {
document.getElementById("box").style.outlineColor = "#FF5733";
document.getElementById("box").style.outline = "2px solid";
}
</script>
</body>
</html>