adspace


How to include js in magento?

Answer Posted / Rohit Bhatnagar

In Magento, you can include JavaScript by following these steps:
1. Create or edit a JS file in your custom module's View > js folder.
2. Define the script within the module's di.xml file.
3. Register the script in the layout XML file (e.g., default_head_blocks.xml).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the latest version of magento?

72