<html>
<body>
<div id="myDiv" style="border-style:groove dotted;">This is a div.</div>
<br>
<button type="button" onclick="myFunction()">Return border style</button>
<script>
function myFunction() {
alert(document.getElementById("myDiv").style.borderStyle);
}
</script>
</body>
</html>