JS根据高度自动添加滚动条
<script> $(document).ready(function(){ var height=$(window).height()-50; var o = document.getElementById("view"); var h = o.offsetHeight; //高度 if(h > height){ o.style.overflow='auto'; o.style.height=height+'px'; } }); </script>
<script> $(document).ready(function(){ var height=$(window).height()-50; var o = document.getElementById("view"); var h = o.offsetHeight; //高度 if(h > height){ o.style.overflow='auto'; o.style.height=height+'px'; } }); </script>