源碼
<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 事件會在頁面或圖像加載完成後立即發生。