Home > Web Front-end > JS Tutorial > body text

JavaScript fixes the DIV height and automatically adds scroll bars to the exceeded part

高洛峰
Release: 2016-11-25 14:55:51
Original
1176 people have browsed it

function setheight() 
    { 
    var div=document.getElementById("event_basicInfo"); 
    //div.style.width="40%"; 
    div.style.height=400; 
    div.style.overflow="auto"; 
    } 
    window.onload=setheight;
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template