js固定DIV高度,超出部分自动添加滚动条的简单方法

复制代码 代码如下:

  function setheight()

  {

  var div=document.getElementById("event_basicInfo");

  //div.style.width="40%";

  div.style.height=400;

  div.style.overflow="auto";

  }

  window.onload=setheight;