IE6 does not support Max height

From , 3 Years ago, written in JavaScript, viewed 81 times.
URL https://pastebin.vip/view/197f76fe
  1. //直接操作需要的元素
  2. var container = document.getElementById('container');
  3. container.style.height = (container.scrollHeight > 199) ? "200px" : "auto";
  4.  
  5. //定义函数,多次调用
  6. function setMaxHeight(elementId, height){
  7.         var container = document.getElementById(elementId);
  8.         container.style.height = (container.scrollHeight > (height - 1)) ? height + "px" : "auto";
  9. }
  10. //调用函数
  11. setMaxHeight('container1', 200);
  12. setMaxHeight('container2', 500);
  13. //javascript/5130

Reply to "IE6 does not support Max height"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website