December 3, 2012

How to include external Javascript file in Visualforce page

To include external Javascript file in Visualforce page, follow the below steps

1. Add the JS file in Setup --> App Setup --> Develop --> Static Resources.

2. Add the below code in your Visualforce page

<apex:includeScript value="{!$Resource.Resource_Name_of_JS_File}"/>

1 comment:

  1. How to include js file in vf if thie file contains into the .jar file...

    ReplyDelete