Home page Basic html html tables Image tags Html forms Free Tracking Website hostingCopy and paste JavascriptOn this page you'll find simple Javascript you can use on your website.You need no programming skill to use these scripts on your pages. The Javascript code is displayed on your webpage using your visitors browser. Adding a popup warning window to your webpageThe code below pops up a warning window your visitor must click.You can change the text in quotes to what ever your wish. <script language="javascript"> alert("You must be 18 to enter"); </script> Just copy and paste this code to your page. Adding the date your page was last updatedThis code displays the above line of text. <script language="Javascript" type="text/javascript"> <!-- document.write("Last Modified " + document.lastModified) // --> </script> Displaying your visitors browser typeThis code displays your users browser info. as soon above. <script language="Javascript" type="text/javascript"> <!-- document.write("You are using " + navigator.appName + " " + navigator.appVersion); // --> </script> Add a drop down url menu to your pageThis Javascript displays the above drop down menu. This can be used to navigate your site from one drop down menu. You may add url code lines and use any page urls you like. <script language="Javascript" type="text/javascript"> <!-- function go() {if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value}} //--> </script> <script language="Javascript" type="text/javascript"> <!-- document.write('<form name="selecter"><select name="select1">'); document.write('<option value=none>Select website from menu'); document.write('<option value="http://www.google.com">google'); document.write('<option value="http://www.yahoo.com">yahoo'); document.write('<option value="http://www.msn.com">msn'); document.write('<option value="http://www.ask.com">ask'); document.write('</select>'); document.write('<input type="button" value="Go" onclick="go()">'); document.write('</form>'); //--> </script> |
|
|