2015-09-06 41 views

回答

1

調用您想要運行的函數。

function doBusiness() { 
    // the business 
} 
doBusiness(); // leave the program where it is but make sure this is outside of any function that isn't called right away 

如果你不想做生意了第一次加載頁面,看看sessionStorage的,良好的出發點是mozilla doc。歡呼聲

1

您可以使用:

<body onload="yourLoadingFunction()"> 

document.onload = function(){ 
    //your code here 
} 

所有的這些功能應包括在你的頁面的標籤。