How to Call JavaScript Function onLoad of Visualforce Page?

 Sample Code:


Visualforce Page:

<apex:page action="{!onLoad}">

<script type = "text/javascript">

    window.onload=function()      
    {        
        alert("Hi");
    };

</script>

</apex:page>



Controller:

public class sample {
        public sample(){
        }

        public void onLoad(){

            
        }
}

Follow Us

Posted By : Sudeer Kamat Date :

view_module Related

label Labels

Comments 0