OnLoad function in visualforce
Method 1:
<script type = "text/javascript">
window.onload=function()
{
alert("Hi");
};
</script>
Method 2:
Visuaforce page:
<apex:page action="{!onLoad}">
</apex:page>
Controller:
public class sample {
public sample(){
}
public void onLoad(){
.
}
}
<script type = "text/javascript">
window.onload=function()
{
alert("Hi");
};
</script>
Method 2:
Visuaforce page:
<apex:page action="{!onLoad}">
</apex:page>
Controller:
public class sample {
public sample(){
}
public void onLoad(){
.
}
}
No comments:
Post a Comment