Sample Code:
Visualforce Page :
<apex:page >
<script>
function show(){
alert('Test');
}
</script>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Call JavaScript" onclick="show();"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
0 Comments