JavaScript? Not my best field too. I don't really know them :). So, I am taking those script from other site and don't worry, I will not make them mine. I'll state there where I get them from. It would be better if you pay a visit to their site, you might get something really useful.
These are some quite simple JavaScript that I get from LissaExplains. You can find more scripts using the Links Page.
You can create a hover button with this code. There are many types of effects other that glow. There are glow, lightglow, reverseglow, bevelin, bevelout, average and fill. Change the text to whatever text you want the button to show. You need to download the classes and put them in the same directory with your web page. Get them here. | |
<applet code="fphover.class" width="x"
height="x"> <param name="text" value="Home"> <param name="color" value="#xxxxxx"> <param name="hovercolor" value="#xxxxxx"> <param name="textcolor" value="#xxxxxx"> <param name="effect" value="glow"> <param name="url" value="url" valuetype="ref"> <param name="font" value="arial"> <param name="fontstyle" value="bold"> <param name="fontsize" value="x"> </applet> |
|
This one will give you alert when you click on it. Try and see! | |
<form><input type="button" value="click here" onClick='alert("Your message here")'></form> | |
This is another mouseover thingy, but with alert. | |
<a href="" onMouseover="alert('Your alert message here')">Your message here</a> | Come and get me |
Cool! This one will pop-up an alert showing you time and date when you enter the page. | |
<script language="JavaScript"> <!-- Hide the JavaScript from older browsers document.write("Having a great day?") document.write("<BR>") document.write("Today's date is ",Date()) // End hiding of script --> </script> |
|
You can use this to show a welcome message when people visit to your site. | |
<SCRIPT language="JavaScript">alert("your message here")</SCRIPT> | |