<div id="test"></div> JS: <script> function ShowDivBoxOrNot(objName, bShow) { if (bShow == true) { document.getElementById(test).style.display = "block"; } else { document.getElementById(test).style.display = "none"; } }; </script>
js直接封装了Div的显示与隐藏,一般用于很多弹框!