javascript tutorialsJavascript Code SnippetsHere is a handy collection of some very simple, commonly used JavaScript code snippets: Links -
<a href="javascript:void(0);">link text</a>
<a href="javascript:window.close();">Close Window</a>
<a href='javascript:;' onClick='window.print();return false'>Print this page</a>
Images -
<script type="text/javascript">
if (document.images) { img1 = new Image(); img2 = new Image(); img1.src = "imageName1.gif"; } |
|
Custom Search
Some developers offer ready made scripts that can be modified to work in your website. Some of these scripts are free and some require a small fee, but they are well worth it:
|