源码
- <script>
- window.onload=init;
- function init() {
- showhide(2);
- }
- function showhide(n) {
- var box = document.getElementById("asset");
- box.className="active";
- var box = document.getElementById("cmdb");
- box.className="active";
- }
- </script>
功能
页面加载完成后, 高亮显示导航栏和侧边栏菜单
事件
window.onload
onload 事件会在页面或图像加载完成后立即发生
参考链接
onload
adminset
来源: http://www.bubuko.com/infodetail-2501066.html