Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
Free
Java Codes !!
!!
شفرات جافا مجانيه
what it makes
ماذا تعمل
هذه الشفره
Time Messages example:
if the time is 9:00 am there is a msg = Good Morning :)
رساله على
حسب الوقت مثال: اذا
كانت السعه التاسعه صباحا ستجد الرساله
تقول صباح الخير
---------------------------------------------------
NOON! Great, it must be time for me to eat breakfast!Good
Morning!
---------------------------------------------------------------
Simply
click inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text editor (such
as NotePad or SimpleText) and save (Control-s or Apple-s). The script is yours!
What it Makes
ماذا تعمل
Alert Msg Button ... if any one Press the
button there is Aler Msg will pop to him like this :
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
What it Makes
ماذا تعمل هذه الشفره
منع استخدام الزر
اليمين
No Right Click on the Mouse
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<SCRIPT language=JavaScript><!--
function click() {
if (event.button==2) {
alert('Welcome in My Site :) ');
}
}
document.onmousedown=click
// -->
What it Makes ماذا تعمل
هذه الشفره
Here is a JavaScript confirm
message that has variable responses. Basically, the response they get depends on
what the user enters.
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<!-- TWO STEPS TO INSTALL CONFIRM (ALERT):
1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- http://www.hey.to/spcialman -->
<!-- Begin
function askData() {
var inputedData = prompt ("type something!", "" );
if (confirm("Are you sure you typed "+inputedData+"?")) {
alert ("Ok, you did type "+inputedData+"!");
}
else {
alert ("No, you did not type "+inputedData+", did you? OK. Guess ya did.");
}
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<FORM>
<input type=button value="Confirm (Alert)" onClick="askData()">
</FORM>
<!-- Or another method... --><BR>Or....<BR>
<A HREF="" onMouseover="askData()">Confirm & Alert</A>
</CENTER>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://www.hey.to/spcialman">SpcialMan</a></font>
</center><p>
<!-- Script Size: 1.03 KB -->
What it Makes ماذا تعمل
هذه الشفره
Game لعبه :
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<SCRIPT LANGUAGE="JavaScript">
// ---- Make array
function MakeArray( n){
this.length = n;
for (var i = 1; i <= n; i++) {
this[i] = 0
}
return this
}
// ----- poor man's random number
var d0 = new Date();
var r0 = d0.getSeconds();
function poor_rand(){
d1 = new Date();
r0 = (r0 * r0 + r0 + d1.getSeconds()) % 3721 ;
return r0 % width_n;
}
// ---- Parameters of game
var height_n = 8;
var width_n =5;
// ---- state of game
var enemy = new MakeArray( width_n); // enemy positions
var wtime; // wait time
var score; // points
var gameover; // in case of gameover set to true
function gamememe(){
// ----- Make the battlefield.
document.write( "<FORM NAME='fm1'>");
document.write( "<INPUT TYPE='text' NAME='message' SIZE=20>");
document.write( "</FORM>");
document.write( "<FORM NAME='fm2'><TABLE>");
for( var i=0; i<height_n; i++){
document.write( "<TR>");
for( var j=0;j<width_n; j++){
document.write( "<TD><CENTER><INPUT TYPE='radio'>"+
"</CENTER></TD>");
}
document.write( "</TR>");
}
document.write( "<TR>");
for( var j=0;j<width_n; j++){
document.write( "<TD><INPUT TYPE='button' VALUE='A'"+
" onClick='fire("+ j + ")'></TD>");
}
document.write( "</TR>");
document.write( "</TABLE>");
document.write( "<INPUT TYPE='button' VALUE='START'"+
" onClick='game_start()'>");
document.write( "</FORM>");
}
// ----- game main timer event
// ----- enemy come one step
function come(){
var n = poor_rand();
document.fm2.elements[ width_n * enemy[n+1] + n].checked=true;
enemy[n+1]++;
if( enemy[n+1] < height_n){
setTimeout("come()", wtime);
}else{
gameover = true;
document.fm1.message.value = "GAME OVER:" + score ;
}
}
// ----- Fire the n th beam
function fire( n){
if( gameover ) return;
for( var i=0; i<enemy[n+1]; i++){ // clear enemy
document.fm2.elements[ width_n * i + n].checked = false;
}
score += enemy[ n+1];
document.fm1.message.value = "Points:" + score;
enemy[ n+1] = 0;
if( wtime > 100){ wtime -= 10};
}
// ---- initialize & start game
function game_start(){
for( var n=0; n<width_n; n++){
for( var i=0; i<enemy[n+1]; i++){
document.fm2.elements[ width_n * i + n].checked = false;
}
enemy[n+1] = 0;
}
wtime = 400;
score = 0;
gameover = false;
document.fm1.message.value = "Points:" + score;
setTimeout("come()", wtime);
}
// -->
</SCRIPT>
<script language="JavaScript"><!--
{gamememe();}
//--></script>
What it Makes ماذا تعمل
هذه الشفره
Game لعبه :
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<SCRIPT LANGUAGE="LiveScript">
<!---Copyright 1996 Chris Englmeier
<!---Feel free to use this script as long as these copyright
<!-- line remain as is
<!--
step = 0;
diff=3;
// change board when button is clicked
function clear_all(form) {
step = 0;
for (i=0;i<9; ++i) {
position="a"+i;
form[position].value="";
}
}
// change board when button is clicked
function clickit(field) {
if (step == -1) {alert("Reset to play again"); return;}
position=field.name.substring(1,2,1);
position = 'a'+position;
if (field.form[position].value !="")
{alert("Can't go there"); return;}
field.form[position].value="X";
if (eval_pos(field.form)) {
field.form.output.value="You Win!";
step = -1;
return;
}
position=get_move(field.form);
field.form.output.value='I moved to ' +
position.substring(1,2,1);
if (position=="") {
field.form.output.value="No Winner.";
step = -1;
return;
}
field.form[position].value="O";
if (eval_pos(field.form)) {
field.form.output.value="You Lose!";
step = -1;
}
}
// see if there is a winner
function eval_pos(form) {
if ((form.a0.value!="" && form.a0.value==form.a3.value &&
form.a0.value==form.a6.value)||
(form.a0.value!="" && form.a0.value==form.a1.value &&
form.a0.value==form.a2.value) ||
(form.a0.value!="" && form.a0.value==form.a4.value &&
form.a0.value==form.a8.value) ||
(form.a1.value!="" && form.a1.value==form.a4.value &&
form.a1.value==form.a7.value) ||
(form.a2.value!="" && form.a2.value==form.a5.value &&
form.a2.value==form.a8.value) ||
(form.a2.value!="" && form.a2.value==form.a4.value &&
form.a2.value==form.a6.value) ||
(form.a3.value!="" && form.a3.value==form.a4.value &&
form.a3.value==form.a5.value) ||
(form.a6.value!="" && form.a6.value==form.a7.value &&
form.a6.value==form.a8.value))
return true;
else
return false;
}
function f(a) {
if (a == "") return "."; else return a;
}
// get position for move.
function comp_move(form,player,weight,depth) {
var cost;
var bestcost=-2;
var position;
var newplayer;
if (player=="X") newplayer="O"; else newplayer="X";
if (depth==diff) return 0;
if (eval_pos(form)) return 1;
for (var i=0; i<9; ++i) {
position='a'+i;
if (form[position].value != "")
continue;
form[position].value=player;
cost = comp_move(form,newplayer, -weight, depth+1);
if (cost > bestcost) {
bestcost=cost;
if (cost==1) i=9;
}
form[position].value="";
}
if (bestcost==-2) bestcost=0;
return(-bestcost);
}
// get position for move.
function get_move(form) {
var cost;
var bestcost=-2;
bestmove="";
// don't think about first move.
if (step++ == 0)
if (form.a4.value=="") return "a4";
else if (form.a0.value=="") return "a0";
for (var i=0; i<9; ++i) {
localposition='a'+i;
if (form[localposition].value != "")
continue;
form[localposition].value="O";
cost=comp_move(form,"X", -1, 0);
if (cost > bestcost) {
if (cost==1) i=9;
bestmove=localposition;
bestcost=cost;
}
form[localposition].value="";
}
return bestmove;
}
// complain if user attempts to change board
function complain(field) {
field.form.output.focus(); // put focus eleswhere
alert("Don't change the game fields directly!");
}
//a href="http://www.ucsd.edu/
// the end -->
</SCRIPT>
<FORM>
<INPUT SIZE=1 NAME="a0" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b0" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a1" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b1" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a2" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b2" OnClick="clickit(this)"><BR>
<INPUT SIZE=1 NAME="a3" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b3" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a4" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b4" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a5" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b5" OnClick="clickit(this)"><BR>
<INPUT SIZE=1 NAME="a6" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b6" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a7" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b7" OnClick="clickit(this)">
<INPUT SIZE=1 NAME="a8" OnFocus="complain(this)">
<INPUT TYPE="button" NAME="b8" OnClick="clickit(this)"><BR>
<table border=0><tr><td>
Message:</td><td> <INPUT NAME="output" TYPE="text"></td></tr>
<tr><td>Difficulty: </td><td><SELECT NAME="difficulty"
OnChange="diff=form.difficulty[form.difficulty.selectedIndex].value;">
<OPTION VALUE=1> Very Easy
<OPTION VALUE=2> Easy
<OPTION VALUE=3 SELECTED> Medium
<OPTION VALUE=4> Hard (may think a long time)
</SELECT></td></tr>
<tr><td></td><td><INPUT TYPE="button" VALUE="Computer Moves First"
OnClick="if (!step++) this.form.a4.value='O';"></td></tr>
<tr><td></td>
<td><INPUT TYPE="reset" VALUE="Restart"
OnClick="clear_all(this.form)"></td></tr>
</table>
</FORM>
What it Makes ماذا تعمل
هذه الشفره
رزنامة Calendar :
Aug. 2000
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<SCRIPT LANGUAGE="JavaScript">
<!--
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
{
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
}
function calendar()
{
var monthNames = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31);
year = today.getYear();
if (year <= 200)
year += 1900;
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29;
nDays = monthDays[today.getMonth()];
firstDay = today;
firstDay.setDate(1); // works fine for most systems
testMe = firstDay.getDate();
if (testMe == 2)
firstDay.setDate(0);
startDay = firstDay.getDay();
document.writeln("<CENTER>");
document.write("<TABLE BORDER='1' BGCOLOR=White>");
document.write("<TR><TH COLSPAN=7>");
document.write(monthNames.substring(today.getMonth() * 3,
(today.getMonth() + 1) * 3));
document.write(". ");
document.write(year);
document.write("<TR><TH>Sun<TH>Mon<TH>Tue<TH>Wed<TH>Thu<TH>Fri<TH>Sat");
document.write("<TR>");
column = 0;
for (i=0; i<startDay; i++)
{
document.write("<TD>");
column++;
}
for (i=1; i<=nDays; i++)
{
document.write("<TD>");
if (i == thisDay)
document.write("<FONT COLOR=\"#FF0000\">")
document.write(i);
if (i == thisDay)
document.write("</FONT>")
column++;
if (column == 7)
{
document.write("<TR>");
column = 0;
}
}
document.write("</TABLE>");
document.writeln("</CENTER>");
}
calendar();
// -->
</SCRIPT>
What it Makes ماذا تعمل
هذه الشفره
Clock ساعه :
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<SCRIPT LANGUAGE="JavaScript">
var timerID = null
var timerRunning = false
function stopclock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startclock()
{
stopclock()
showtime()
}
function showtime()
{
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var timeValue = "" + ((hours > 12) ? hours - 12 : hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? "PM" : "AM"
document.clock.face.value = timeValue
timerID = setTimeout("showtime()",1000)
timerRunning = true
}
//-->
</SCRIPT>
<form name="clock" onSubmit="0">
<INPUT TYPE="text" NAME="face" SIZE=11 READONLY VALUE ="....Initializing....">
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
startclock()
//-->
</SCRIPT>
What it Makes ماذا تعمل
هذه الشفره
بحث في نفس الصفحه
find in the Page :
Find in Page
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<!-- TWO STEPS TO INSTALL FIND IN PAGE:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- The JavaScript Source!! http://www.hey.to/spcialman -->
<!-- Begin
var NS4 = (document.layers);
var IE4 = (document.all);
var win = this;
var n = 0;
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0) alert(str + " was not found on this page.");
}
if (IE4) {
txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert(str + " was not found on this page.");
}
}
return false;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<form name=search onSubmit="return findInPage(this.string.value);">
Find in Page
<input name=string type=text size=15 onChange="n = 0;">
</form>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://www.hey.to/spcialman">SpcialMan</a></font>
</center><p>
<!-- Script Size: 1.54 KB -->
What it Makes ماذا تعمل
هذه الشفره
ترحيب عندما يدخل
اي شخص الصفحة
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- The JavaScript Source!! http://www.hey.to./spcialman -->
<!-- Begin
function testIt() {
Response = "";
while ((Response == "") || (Response == "")){
Response=prompt ("What Is Your Name ? ", "");
}
if (Response != null)
alert ("Hello, " + Response + "!");
}
// End -->
</SCRIPT>
<!-- STEP TWO: Add this onLoad event handler into the BODY tag -->
<BODY onLoad="testIt()">
<!-- STEP THREE: Put this code into the BODY of your HTML document -->
<CENTER>
<FORM>
<INPUT TYPE="button" NAME="button1" VALUE="Hello! Click Here!" onClick="testIt()">
</FORM>
</CENTER>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://www.hey.to/spcialman">Spcialman</a></font>
</center><p>
<!-- Script Size: 1.00 KB -->
What it Makes ماذا تعمل
هذه الشفره
تحذير او كلمه
سريعه عندما يدخل اي شخص صفحتك او موقعك
Here is the simpliest and
probably fastest JavaScript alert. As soon as the visitor's browser reads the
JavaScript alert coding, the alert is displayed. This is even faster than the
onLoad alert and even less coding!
Simply click
inside the window below, use your cursor to hilight the script, and copy
(type Control-c or Apple-c) the script into a new file in your text
editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).
The script is yours!
<!-- ONE STEP TO INSTALL QUICK ALERT:
1. Put the designated coding into the HEAD of document -->
<!-- STEP ONE: Copy this code into the HEAD of your document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- http://www.hey.to/spcialman -->
<!-- Begin
alert("Welcome to The JavaScript Source! by SpcialMan . http://hey.to/spcialman ")
// End -->
</script>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://www.hey.to/spcialman">SpcialMan</a></font>
</center><p>
<!-- Script Size: 0.57 KB -->
-----------------------------------------------------------------------------------------------
جافا
سكربتات