Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Using JavaScript in Visualforce Pages
Using JavaScript in Visualforce
pages gives you access to a wide range of existing JavaScript functionality, such as JavaScript
libraries, and other ways to customize the functionality of your pages. Action tags, such as
<apex:actionFunction> and <apex:actionSupport>, support Ajax requests.
The best method for including JavaScript in a Visualforce page is placing the JavaScript in a static resource, then calling
it from there. For example,
You can then use the functions defined within that JavaScript file
within your page using <script> tags.
1<apex:includeScript value="{!$Resource.MyJavascriptFile}"/>