Method 1:
Window.onload =function(){
Var name=document.getElementById(“name”).val();//Load HTML and load all external reference files (images, css styles, js, etc.)
}
Method 2: Need to introduce Jquery .js file
$(document).ready(function(){
alert("JQuery's first introductory case");//Load HTML, no need to wait, immediately Loading
});
Method 3: (Equivalent to method 2)
jQuery(function (){
")
alert($("input[name='message']").attr("value"));
});
Method 4: (Same as above)
$(function ( ){
alert("Execute 1 when JQuery page is automatically loaded....");
});
Method 5-1: window.onload event Loading (Load multiple functions at the same time when the page loads...)
Method 5-2: Loading of window.onload event (multiple functions are loaded at the same time when the page is loaded...)
<script><br> function1(){<br> }<br> function2(){<br> }<br> function3(){<br> }<br> window.onload=function() {<br> function1();<br> function2();<br> function3();<br> }<br></script>