Script 1:
Push the button here:
HTML code for the use of the Script:
Put this code in the <HEAD> part:
<script language="LiveScript">
function pushbutton() {
alert("Hello! How are you today, dear NetSurfur?");
}
</script>
Put this code in the <BODY>
Part:
<form>
<input type="button" name="Button1" value="Push me" onclick="pushbutton()">
</form>
<p>
The script is put in the <HEAD> part of the HTML
code, and the command (the "pushme" button) is integrated in the
<BODY> part where ever you would like.
Of course, you can make the message what ever you would like!
DOWNLOAD THE SCRIPT CODE IN .TXT format
Script 2:
Please enter your name:
Here is the Code for this Script:
Put this code in the <HEAD>
part:
<script language="LiveScript">
<!-- hide script from old browsers
function getname(str) {
alert("Hi, "+ str+"!");
}
// end hiding contents -->
</script>
Put this code in the <BODY>
part:
Please enter your name:
<form>
<input type="text" name="name" onBlur="getname(this.value)" value="">
</form>
</P>
DOWNLOAD THE SCRIPT CODE IN .TXT format
Script 3
What? Nothing for you to do? No buttons for you to push or no text
boxes for you to write? Well, to see this script, look at the status
bar at the bottom of the screen!
Here is the code:
Put this code in the <HEAD>
part:
<script language="JavaScript">
<!-- Hide
var scrtxt="This is where you put the message displayed in the status
bar your friends will "+ "look at for hours in pure fascination...";
var lentxt=scrtxt.length;
var width=100;
var pos=1-width;
function scroll() {
pos++;
var scroller="";
if (pos==lentxt) {
pos=1-width;
}
if (pos<0) {
for (var i=1; i<=Math.abs(pos); i++) {
scroller=scroller+" ";}
scroller=scroller+scrtxt.substring(0,width-i+1);
}
else {
scroller=scroller+scrtxt.substring(pos,width+pos);
}
window.status = scroller;
setTimeout("scroll()",150);
}
//-->
</script>
Put this code in the <BODY> TAG:
<body onLoad="scroll();return true;">
You can put any greeting message you would like in the status bar.
Plus, there are many other codes you can add to this script (I don't
have them, ok?) like:
- Change the speed of the scroling
- Make the message flash in the status bar
- Insert multiple messages
- Etc.
DOWNLOAD THE SCRIPT CODE IN .TXT format
Click HERE to return to the JavaScript
page
Click HERE to return to the AnatoleNET Home
Page
Click HERE to go to the GEOCITIES
Home page: Get your FREE home page HERE!