Change the width of the outline of a <div> element, using the "thick" value: - Javascript CSS Style Property

Javascript examples for CSS Style Property:outlineWidth

Description

Change the width of the outline of a <div> element, using the "thick" value:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
#myDiv {// w ww  .  j a  v a  2  s  .com
    border: 1px solid red;
    outline: thin solid green;
}
</style>
</head>
<body>

<div id="myDiv">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Change outline width</button>

<script>
function myFunction() {
    document.getElementById("myDiv").style.outlineWidth = "thick";
}
</script>

</body>
</html>

Related Tutorials