Home  >  Article  >  Web Front-end  >  JavaScript fixes the DIV height and automatically adds scroll bars to the exceeded part

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

高洛峰
高洛峰Original
2016-11-25 14:55:511170browse

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


Statement:
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
Previous article:ajax basicsNext article:ajax basics