자바스크립트 columnWidth 사용 열 너비를 설정하는 속성입니다.
예시
다음 코드를 실행하여 JavaScript로 열 너비를 설정할 수 있습니다.
<!DOCTYPE html> <html> <body> <p>Set the width of the columns</p> <button onclick="display()">Change Width</button> <div id="myID"> This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text. </div> <script> function display() { document.getElementById("myID").style.columnWidth = "70px"; } </script> </body> </html>