About WHSR Guest
This article was written by a guest contributor. The author's views below are entirely his or her own and may not reflect the views of WHSR.
JavaScrip Beginner Tips: What You Need To Know?
For starters, a few basics you need to know are:
No, I am not trying to scare you away with these points.
This little snippet will prevent your website from trying to display a video that the browser cannot support, saving you bandwidth and processing power.
This snippet is a little long but very useful, it will allow your site to store information on the viewer’s computer then read it at another point in time. This snippet can be used in many different ways to accomplish different tasks.
This snippet will prevent your site from having that awkward time when it is only displaying part of the site; this not only looks bad but is also unprofessional. All you have to do is add your images to the preloadImages section and you are ready to roll.
This snippet will prevent the viewer from being able to right-click on your page. This can discourage the average user from borrow images or code from your site.
Ok so this is not a snippet that all sites would use but it can be used to display more than just random quotes. You can change the content ok the quotes to whatever you want and have random images or text displayed anywhere on your site.
This snippet is great if you have multiple pages on an article or tutorial. It will allow the user the browse between the pages with ease. It is also small and light weight from a resource point of view.
This snippet will allow the user to bookmark your page with ease; all they have to do is click the link. Its little features like this that can increase your viewers overall experience.
This little link will allow your views to easily print your page. It utilizes the quick print feature already setup by your browser and utilizes no resources until it is clicked.
This snippet will allow you to display the current date anywhere on your webpage and does not need to be updated. Simply put it in place and forget about it.
This snippet would be used mainly by sites that use numbers often. This snippet will keep your numbers looking the same across the board. All you have to do is copy the body line where you want to add a number and replace the number there with your number.
This snippet will allow you to get the width and height of the display area in your views browser. This will give the designer the ability to create and use different displays based on the size of the user’s browser window.
This snippet will allow you to redirect your viewers to another page and it has the option of setting a delay. The use of this snippet is pretty self-explanatory and it is a very valuable tool to have in your belt.
This snippet will allow you to detect if your viewer is on an iPhone or iPod allowing you to display different content to them. This snippet is invaluable with how large the mobile market is and it is only going to continue to grow.
This little snippet will allow you to print a message to the status bar. You can display recent or important news in an area the will catch the eye of the user.