2015-09-06 42 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 
} 

所有的这些功能应包括在你的页面的标签。