<Free Codes>

Tips

Disabling Right-Click

This code disables the surfer from right-clicking and taking images, or copying something from your site.

<script language="JavaScript"><!-- function click() {if (event.button==2){alert('TEXT')}}document.onmousedown=click// --> </script>

Pop-Up that asks for your name

You can ask your visitor for their name.

<center>Hey, <script language="VBScript"><!-- Dim Name Name=InputBox("What's it that people call ya?") document.write Name --></script>

To put a Midi or MP3 or anything else

Its nice to have a song in the background while surfing a web site.

<embed src="midi url" loop="true" autostart="true" controls="smallconsole">

Marquee
You need to change "Marquee Sliding Text Example" to what you want it to say.

Marquee Sliding Text Example

<marquee ALIGN="Top" LOOP="infinite" BEHAVIOR="slide" BGCOLOR="#FF0000" DIRECTION="left" HEIGHT=30 WIDTH=200> Marquee Sliding Text Example </marquee>

Menu
This is an unnumbered list of fruits, don't forget to change it with what you want it to say

  • apples
  • oranges
  • pears
  • <MENU> <LI>apples <LI>oranges <LI>pears </MENU>

    Numbered List
    This is a numbered list of fruits

    1. apple
    2. banana
    3. pear
    <OL> <LI>apple <LI>banana <LI>pear </OL>

    Table
    Don't forget to change it with what you want it to say

    Teachers Name List
    Name
    Joe Blow Middle School
    Susan Planter Southern High

    <TABLE> <CAPTION>Teachers Name List</CAPTION> <TR> <TH>Name</TH> </TR> <TR> <TD>Joe Blow</TD> <TD>Middle School</TD> </TR> <TR> <TD>Susan Planter</TD> <TD>Southern High</TD> </TR> </TABLE>

    Text Area
    Don't forget to change it with what you want it to say

    <FORM> <TEXTAREA NAME="comments" ROWS=4 COLS=50> Enter your comments here! </TEXTAREA> </FORM>

    Horizontal Line

    <hr size=5 width=75%> you will see:

    Still Background
    If you dont want your background to be moving when you are scrolling down put the following code:

    bgproperties="fixed"

    This is the order:
    the body color, background, bgproperties, text, link, alink, vlink

    Clock for your page

    <script LANGUAGE="JavaScript"> <!-- Begin function MakeArrayday(size) { this.length = size; for(var i = 1; i <= size; i++) { this[i] = ""; } return this; } function MakeArraymonth(size) { this.length = size; for(var i = 1; i <= size; i++) { this[i] = ""; } return this; } function funClock() { if (!document.layers && !document.all) return; var runTime = new Date(); var hours = runTime.getHours(); var minutes = runTime.getMinutes(); var seconds = runTime.getSeconds(); var dn = "AM"; if (hours > 12) { dn = "PM"; hours = hours - 12; } if (hours == 0) { hours = 12; } if (minutes <= 9) { minutes = "0" + minutes; } if (seconds <= 9) { seconds = "0" + seconds; } movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>"; if (document.layers) { document.layers.clock.document.write(movingtime); document.layers.clock.document.close(); } else if (document.all) { clock.innerHTML = movingtime; } setTimeout("funClock()", 1000) } window.onload = funClock; // End --> </script> <font face="Tahoma" size="1" color="#FFFFFF"> </font></b></td> <td width="27%" height="1" align="right"><font face="Tahoma" size="2" color="#0000FF"><b><span id="clock" style="position:relative;"></span></b></font></td> </tr> </table> I will be putting more codes as I find them. Im thinking on putting the ones I have use through my page. You can use this two pages as a reference.

    JavaFILE...FREE Java and Javascripts!

    Click here to go back to the main page