<html>
<head>
<style>
#myDiv {
border: 1px solid red;
}
</style>
</head>
<body>
<div id="myDiv">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Set outline style</button>
<script>
function myFunction() {
document.getElementById("myDiv").style.outlineStyle = "dotted";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_outlinestyle by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:19:37 GMT -->
</html>