Research - Scripts - cinema - lyrics - Sport - Poemes

هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.
Research - Scripts - cinema - lyrics - Sport - Poemes

عــلوم ، دين ـ قرآن ، حج ، بحوث ، دراسات أقســام علمية و ترفيهية .


    جافا سكريبت الجزء الثاني

    avatar
    GODOF
    Admin
    Admin


    عدد المساهمات : 10329
    نقــــاط التمـــيز : 61736
    تاريخ التسجيل : 08/04/2009
    العمر : 33

    جافا سكريبت الجزء الثاني Empty جافا سكريبت الجزء الثاني

    مُساهمة من طرف GODOF الإثنين 21 سبتمبر - 21:15

    [center][b][font=Tahoma][size=9]هذا الكود لجعل زر الفارة الأيمن لايعمل[/size][/font][/b]
    <!-- THREE STEPS TO INSTALL MOUSE BANNER: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY tag your HTML document 3. Put the final code inside the BODY of your HTML page --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <style>.spanstyle { COLOR: white; FONT-FAMILY: Verdana; FONT-SIZE: 8pt; FONT-WEIGHT: bold; POSITION: relative ; TOP: -50px; VISIBILITY: visible } </style> <--SS-- LANGUAGE="--SS--"> <!-- Original: Peter Gehrig --> <!-- Web Site: http://www.24fun.ch --> <!-- This --SS-- and many more are available free online at --> <!-- The --SS-- Source!! http://--SS--.internet.com --> <!-- Begin var x, y; var step = 10; var flag = 0; var message = "--SS-- is so cool !! "; message = message.split(""); var xpos = new Array(); for (i = 0; i <= message.length - 1; i++) { xpos[i] = -50; } var ypos = new Array(); for (i = 0; i <= message.length - 1; i++) { ypos[i]= -50; } function handlerMM(e) { x = (document.layers) ? e.pageX : document.body.scrollLeft + event.clientX; y = (document.layers) ? e.pageY : document.body.scrollTop + event.clientY; flag = 1; } function makesnake() { if (flag == 1 && document.all) { for (i = message.length - 1; i >= 1; i--) { xpos[i] = xpos[i - 1] + step; ypos[i] = ypos[i - 1]; } xpos[0] = x + step; ypos[0] = y; for (i = 0; i < message.length - 1; i++) { var thisspan = eval("span" + (i) + ".style"); thisspan.posLeft = xpos[i]; thisspan.posTop = ypos[i]; } } else if (flag==1 && document.layers) { for (i = message.length - 1; i >= 1; i--) { xpos[i] = xpos[i - 1] + step; ypos[i] = ypos[i - 1]; } xpos[0] = x + step; ypos[0] = y; for (i = 0; i < message.length - 1; i++) { var thisspan = eval("document.span" + i); thisspan.left = xpos[i]; thisspan.top = ypos[i]; } } var timer = setTimeout("makesnake()", 10); } // End --> </--SS--> </HEAD> <!-- STEP TWO: Copy this code into the BODY tag od your HTML document --> <body bgcolor="#000080" text="#000000" NOOP="makesnake()" style="OVERFLOW-X: hidden; OVERFLOW-Y: scroll; WIDTH: 100%"> <!-- STEP THREE: Put the final code inside the BODY of your HTML document --> <--SS-- LANGUAGE="--SS--"> <!-- Begin for (i = 0; i <= message.length-1; i++) { document.write("<span id='span"+i+"' class='spanstyle'>"); document.write(message[i]); document.write("</span>"); } if (document.layers) { document.captureEvents(Event.MOUSEMOVE); } document. NOOP = handlerMM; // End --> </--SS--> <p><center> <font face="arial, helvetica" SIZE="-2">Free --SS--s provided<br> by <a href="http://--SS--source.com">The --SS-- Source</a></font> </center><p> <!-- --SS-- Size: 2.08 KB -->
    [b][font=Tahoma][size=9]تقليب لون الشاشة[/size][/font][/b]
    <--SS-- language="--SS--"> <!-- //you can assign the initial color of the background here r=255; g=255; b=255; flag=0; t=new Array; o=new Array; d=new Array; function hex(a,c) { t[a]=Math.floor(c/16) o[a]=c%16 switch (t[a]) { case 10: t[a]='A'; break; case 11: t[a]='B'; break; case 12: t[a]='C'; break; case 13: t[a]='D'; break; case 14: t[a]='E'; break; case 15: t[a]='F'; break; default: break; } switch (o[a]) { case 10: o[a]='A'; break; case 11: o[a]='B'; break; case 12: o[a]='C'; break; case 13: o[a]='D'; break; case 14: o[a]='E'; break; case 15: o[a]='F'; break; default: break; } } function ran(a,c) { if ((Math.random()>2/3||c==0)&&c<255) { c++ d[a]=2; } else { if ((Math.random()<=1/2||c==255)&&c>0) { c-- d[a]=1; } else d[a]=0; } return c } function do_it(a,c) { if ((d[a]==2&&c<255)||c==0) { c++ d[a]=2 } else if ((d[a]==1&&c>0)||c==255) { c--; d[a]=1; } if (a==3) { if (d[1]==0&&d[2]==0&&d[3]==0) flag=1 } return c } function disco() { if (flag==0) { r=ran(1, r); g=ran(2, g); b=ran(3, b); hex(1,r) hex(2,g) hex(3,b) document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3] flag=50 } else { r=do_it(1, r) g=do_it(2,g) b=do_it(3,b) hex(1,r) hex(2,g) hex(3,b) document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3] flag-- } if (document.all) setTimeout('disco()',50) } //--> </--SS-->
    [b][font=Tahoma][size=9]لعبة[/size][/font][/b]
    <--SS-- LANGUAGE="--SS--"> // ---- 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'"+ " NOOP='fire("+ j + ")'></TD>"); } document.write( "</TR>"); document.write( "</TABLE>"); document.write( "<INPUT TYPE='button' VALUE='START'"+ " NOOP='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); } // --> </--SS--> <--SS-- language="--SS--"><!-- {gamememe();} //--></--SS-->
    [b][font=Tahoma][size=9]بحث في نفس الصفحة[/size][/font][/b]
    <!-- 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> <--SS-- LANGUAGE="--SS--"> <!-- The --SS-- 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 --> </--SS--> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <form name=search NOOP="return findInPage(this.string.value);"> Find in Page <input name=string type=text size=15 NOOP="n = 0;"> </form> <p><center> <font face="arial, helvetica" size="-2">Free --SS--s provided<br> by <a href="http://www.hey.to/spcialman?REC=0">SpcialMan</a></font> </center><p> <!-- --SS-- Size: 1.54 KB -->
    [b][font=Tahoma][size=9]لعبة أخرى[/size][/font][/b]
    <--SS-- LANGUAGE="Live--SS--"> <!---Copyright 1996 Chris Englmeier <!---Feel free to use this --SS-- 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 --> </--SS--> <FORM> <INPUT SIZE=1 NAME="a0" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b0" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a1" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b1" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a2" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b2" NOOP="clickit(this)"><BR> <INPUT SIZE=1 NAME="a3" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b3" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a4" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b4" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a5" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b5" NOOP="clickit(this)"><BR> <INPUT SIZE=1 NAME="a6" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b6" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a7" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b7" NOOP="clickit(this)"> <INPUT SIZE=1 NAME="a8" NOOP="complain(this)"> <INPUT TYPE="button" NAME="b8" NOOP="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" NOOP="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" NOOP="if (!step++) this.form.a4.value='O';"></td></tr> <tr><td></td> <td><INPUT TYPE="reset" VALUE="Restart" NOOP="clear_all(this.form)"></td></tr> </table> </FORM>
    [b][font=Tahoma][size=9]كلمة سرية للصفحة[/size][/font][/b][/center]

      الوقت/التاريخ الآن هو الخميس 14 نوفمبر - 17:12