The benefits of using an external style sheet include:
- Simplifies Maintenance
- Website Speed
Copy the section “alert(‘Hello World’);” out of the web page and paste it into the new text document you created and save it with a .js extension. In this case alert.js. It needs to be accessible to the web page that needs it so you could place it on the same folder or in a sub folder.
The src attribute in the script tag tells the page where it should look for the alert.js file. If you placed it in a sub folder you would change it to src=”folder/alert.js”. If you have problems with the script not working, check your path first to make sure you are loading the file.
- Blogger Label List for FTP Published Blogs
- Include, Include_once, Require, Require_once
- Webmaster Time Savers – External Style Sheet
- Keep the Comment Bots at Bay
- 7 Easy to Use Document Sharing Websites
- Website Disaster Recovery
- Priceless Data
- WordPress Weekend Project – Ultimate Google Analytics
- Speed Up Your Website with GZIP Compression