높이 사용 요소의 높이를 설정하는 속성입니다. JavaScript로 버튼 높이를 설정하기 위해 다음 코드를 실행할 수 있습니다 -
예시
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<p>This is Demo Text.</p>
<button type="button" id="myID" onclick="display()">Update Height</button>
<script>
function display() {
document.getElementById("myID").style.height = "100px";
}
</script>
</body>
</html>