我想知道javascript函数如何加载或运行.
举个例子,我有这些javascripts功能块;
<span id=indicator></span>
function BlockOne(){
var textToWrite = document.createTextNode("I am ");
document.getElementById("indicator").appendChild(textToWrite);
}
//==========
function BlockTwo(){
var textToWrite = document.createTextNode("Going ");
document.getElementById("indicator").appendChild(textToWrite);
}
//=========
function BlockThree(){
var textToWrite = document.createTextNode("To School ");
document.getElementById("indicator").appendChild(textToWrite);
}
function RunAll(){
BlockOne();
BlockTwo();
BlockThree();
}
window.onload=RunAll();
Run Code Online (Sandbox Code Playgroud)
请先运行这些功能块中的哪一个或以什么顺序运行.