function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SIVASASNKARSIVASASNKAR 

How can i access Static Resources in Java Script Directly.

I want Access Staticresources directly in Javascript . please help me

Best Answer chosen by Admin (Salesforce Developers) 
JitendraJitendra

Yes, you can use it. To get the URL of static resource in Javascript, use this:

 

"{!URLFOR($Resource.RESOURCE_NAME, 'FILE_INSIDE_STATIC_RESOURCE')}"