اخر المواضيع

آخر الأخبار
‏إظهار الرسائل ذات التسميات جافا سكربت ويب. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات جافا سكربت ويب. إظهار كافة الرسائل

الخميس

14 برنامج مصور كود

 نموذج الصوره

الكود الاول

<map name="FPMap0">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/adobe-photoshop-70-me-goodies.html" shape="rect" coords="78, 92, 122, 131">
<area target="_blank" href="https://alsafrany.blogspot.com/2022/10/camtasia-studio.html" shape="rect" coords="272, 13, 313, 63">
<area target="_blank" href="https://alsafrany.blogspot.com/2020/01/cuteftp-9-10.html" shape="rect" coords="327, 89, 373, 136">
<area target="_blank" href="https://alsafrany.blogspot.com/2016/01/goldwave.html" shape="rect" coords="332, 20, 375, 58">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/05/zip-rar.html" shape="rect" coords="21, 19, 125, 59">
<area target="_blank" href="https://alsafrany.blogspot.com/2015/09/microsoft-frontpage.html" shape="rect" coords="140, 87, 191, 131">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/02/frontpage2003-expressionweb200.html" shape="rect" coords="14, 87, 57, 133">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/ccleaner.html" shape="rect" coords="208, 18, 254, 62">
<area target="_blank" href="https://alsafrany.blogspot.com/2022/05/compress.html" shape="rect" coords="392, 20, 436, 62">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/southbaypc-supercleaner.html" shape="rect" coords="145, 16, 183, 57">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/notepad-html-php-css-javascript-sql-txt.html" shape="rect" coords="208, 83, 243, 135">
<area target="_blank" href="https://www.google.com/intl/ar/chrome/" shape="rect" coords="395, 88, 437, 129">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/04/free-image-viewer.html" shape="rect" coords="270, 93, 302, 127">
</map>
<img alt="" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguxasTvJH38n5w1mhn462ftqL5O-ZeMJHwxk7qnzlPFaXP8teJqYXTXSYslewoS4P4Gg_dLLpeMMsS_P5tBc_b7Vhgctobj9WxDq-d3eQoSj-LOMQC1yB4rXnFiROEitKWpDJM1gW6GzCJBkCSdDf-56XOAlY4NXS_0xHp8bPlGyLz2vbqQfmejtAN9w/s450/eakoenh-17.jpg" width="450" usemap="#FPMap0" /></p>

الكود الثاني

<map name="FPMap0">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/05/zip-rar.html" shape="rect" coords="11, 22, 106, 42">
<area target="_blank" href="https://alsafrany.blogspot.com/2022/05/compress.html" shape="rect" coords="393, 17, 415, 55">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/02/frontpage2003-expressionweb200.html" shape="rect" coords="451, 17, 486, 53">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/southbaypc-supercleaner.html" shape="rect" coords="137, 10, 166, 51">
<area target="_blank" href="https://www.google.com/intl/ar/chrome/" shape="rect" coords="831, 23, 860, 55">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/adobe-photoshop-70-me-goodies.html" shape="rect" coords="513, 17, 549, 54">
<area target="_blank" href="https://alsafrany.blogspot.com/2015/09/microsoft-frontpage.html" shape="rect" coords="575, 16, 611, 51">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/notepad-html-php-css-javascript-sql-txt.html" shape="rect" coords="758, 15, 795, 53">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/04/free-image-viewer.html" shape="rect" coords="641, 11, 674, 51">
<area target="_blank" href="https://alsafrany.blogspot.com/2020/01/cuteftp-9-10.html" shape="rect" coords="701, 17, 737, 51">
<area target="_blank" href="https://alsafrany.blogspot.com/2016/01/goldwave.html" shape="rect" coords="264, 14, 301, 48">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/ccleaner.html" shape="rect" coords="201, 15, 237, 59">
<area target="_blank" href="https://alsafrany.blogspot.com/2016/01/goldwave.html" shape="rect" coords="325, 21, 359, 50">
</map>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRvVZBBr08m8j9Gf79B_8kHak3oFwfBmFNdpLTE06SEvKK5DNSJlgaytrBiMDsc8jTMfbyOkNWGqLoU1fca2E8gmIj2-TXNVjKeMgwt31ULJGMPCr87OmxLxeRNgqiLYR5WY0yhv3bRhdi5JMZ1kBnt76nVRaIpy4FCcVA2ZG8Hgjcztt_8IbHmqSAZg/s876/eakoenh-16.jpg" width="876" height="66" usemap="#FPMap0"></p>

الكود الثالث

<map name="FPMap0">
<area target="_blank" href="https://alsafrany.blogspot.com/2022/05/compress.html" shape="rect" coords="7, 59, 40, 79">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/05/zip-rar.html" shape="rect" coords="16, 134, 37, 196">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/02/frontpage2003-expressionweb200.html" shape="rect" coords="73, 189, 102, 205">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/southbaypc-supercleaner.html" shape="rect" coords="135, 181, 162, 207">
<area target="_blank" href="https://www.google.com/intl/ar/chrome/" shape="rect" coords="70, 34, 113, 69">
<area target="_blank" href="https://alsafrany.blogspot.com/2021/09/adobe-photoshop-70-me-goodies.html" shape="rect" coords="73, 101, 106, 131">
<area target="_blank" href="https://alsafrany.blogspot.com/2015/09/microsoft-frontpage.html" shape="rect" coords="70, 146, 102, 169">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/notepad-html-php-css-javascript-sql-txt.html" shape="rect" coords="144, 23, 162, 41">
<area target="_blank" href="https://alsafrany.blogspot.com/2023/04/free-image-viewer.html" shape="rect" coords="144, 62, 167, 87">
<area target="_blank" href="https://alsafrany.blogspot.com/2020/01/cuteftp-9-10.html" shape="rect" coords="139, 103, 165, 126">
<area target="_blank" href="https://alsafrany.blogspot.com/2016/01/goldwave.html" shape="rect" coords="11, 20, 45, 43">
<area target="_blank" href="https://alsafrany.blogspot.com/2017/11/ccleaner.html" shape="rect" coords="136, 142, 165, 168">
<area target="_blank" href="https://alsafrany.blogspot.com/2016/01/goldwave.html" shape="rect" coords="14, 93, 37, 108">
</map>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTrfHSYO70N-wLDmTMPcFxhvkbmrxqoSaup_aOlG9hAxdprlFJrTXqCUkWIP1S4Fvb1pku_myA0eR3VCpHgZnni7ERcp9b9y3E2gyNikhnwAl4ZhU1gxyEjiNxsIC-gKDSCGm1-aeFeOu0ycl8bKlxEt4ZYJs0u8aTMBWmSdKh9yGGuCgKIlhsldzXTQ/s218/eakoenh-15.jpg" width="181" height="218" usemap="#FPMap0"></p>

المثال هنا

https://alsafrany.blogspot.com/p/14.html

وسلامتكم

اقرأ المزيد
author

الجمعة

عداد مشاهدات

 هذا الكود يمكنك تضيفه باي مكان : ليخبرك كم مره زاروا

المثال هنا

https://blog-hkrkoz.blogspot.com/p/blog-page_51.html

<script type="text/javascript">

function ctck() {

var sds = document.getElementById("dum");

if(sds == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n"); }

var sdss = document.getElementById("dumdiv");

if(sdss == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n");

} } document.onload="ctck()";

function getCookieVal(offset)

{

var endstr = document.cookie.indexOf (";", offset);

if (endstr == -1)

endstr = document.cookie.length;

return unescape(document.cookie.substring(offset, endstr)); }

function GetCookie(name)

{

var arg = name + "=";

var alen = arg.length;

var clen = document.cookie.length;

var i = 0;

while (i < clen)

{

var j = i + alen;

if (document.cookie.substring(i, j) == arg)

return getCookieVal (j);

i = document.cookie.indexOf(" ", i) + 1;

if (i == 0)

break;

}

return null; } function SetCookie (name, value)

{

var argv = SetCookie.arguments;

var argc = SetCookie.arguments.length;

var expires = (2 < argc) ? argv[2] : null;

var path = (3 < argc) ? argv[3] : null;

var domain = (4 < argc) ? argv[4] : null;

var secure = (5 < argc) ? argv[5] : false;

document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires=" +expires.toGMTString())) +((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain)) +((secure == true) ? "; secure" : ""); }

var expDays = 30; var expDate = new Date(); expDate.setTime(expDate.getTime() + (expDays*24*60*60*1000));

function DisplayInfo()

{ var cnt = GetCookie('cnt'); if(cnt == null) { SetCookie('cnt','1'); return 1; } else { var cnt1 = parseInt(cnt) + 1; SetCookie('cnt',cnt1,expDate); return cnt;

}

}

document.write("انت الزائر" + DisplayInfo() + " رقم");

</script>

<div style="font-size: 10px;color: #dadada;" id="dumdiv">

وسلامتكم


اقرأ المزيد
author

الاثنين

كود يكشف متى دخلت الصفحه

 المثال

الكود

<!-- يخبرك في متى زرت هذي الصفحه -->

<script type="text/javascript">

function getCookie(c_name) {

if(document.cookie.length>0)

{

c_start=document.cookie.indexOf(c_name + "=");

if (c_start!=-1)

{

c_start=c_start + c_name.length+1;

c_end=document.cookie.indexOf(";",c_start);

if (c_end==-1) c_end=document.cookie.length;

return unescape(document.cookie.substring(c_start,c_end));

}

}

return ""; }

function setCookie(c_name,value,expiredays)

{

var exdate=new Date();

exdate.setDate(exdate.getDate()+expiredays);

document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());

var x = document.cookie(username);

alert("sfs");

document.write(x); }

function showmessage ()

{

var days=421;

nextvisitmsg="حيإأك الله كانت هذي زيارتك الاخيره في [displaydate]";

var dat=new Date();

if(getCookie("visit")==""){

setCookie("visit", dat, days);

document.write("أنت تزور هذا الموقع لأول مرة ");

}

else

{

var p=getCookie("visit");

var pp=Date.parse(p);

var now = new Date();

now.setTime(pp);

var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");

var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

var nd = now.getDate();

var ny = now.getDay();

ny = day[ny];

var nm = now.getMonth();

nm = month[nm];

yy = now.getFullYear();

var hh = now.getHours();

var ampm = "AM";

if(hh >= 12) {ampm = "PM"}

var mins = now.getMinutes();

var secs = now.getSeconds();

var dispDate = ny + ", " + nm + " " + nd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm;

document.write(nextvisitmsg.replace("\[displaydate\]", dispDate))

}

setCookie("visit", dat, days); }

function ctck()

{

var sds = document.getElementById("dum");

if(sds == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n");

}

var sdss = document.getElementById("dumdiv");

if(sdss == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n");

} } document.onload="ctck()"; showmessage ();

</script>

<div style="font-size: 10px;color: #dadada;" id="dumdiv">

&nbsp;</div>

<!-- يخبرك في متى زرت هذي الصفحه -->

وسلامتكم

اقرأ المزيد
author

كود مرور الماوس على الصوره وتكبيره

 المثال

الكود

<!-- مرور الماوس على الصوره وتكبيره -->

<script language="javascript">

//set the time delay,imgsize,arrsize.

var delay=20;

var imgsize=5;

var arrsize=4;

var timeon;

var whoc = new Array(arrsize);

var wid;

var hei;

var i=0;

function zoom_out(p,q,which)

{  

   if(which.width <= p)

      which.width += imgsize;

   if(which.height <= q)

      which.height += imgsize;

   if(which.width <= p)

   {

      var tmp=which.id;

      timeon=eval("setTimeout('zoom_out("+p+","+q+","+tmp+")', delay)");

   }

   if(which.width > p)   

   {

      zoom_check(which.id);

      clearTimeout(timeon);

   }

}

function zoom_check(xx)

{

    for(var x=0; x<(whoc.length);x++)

    {

        if(whoc[x] != null && whoc[x] != xx)

        {

    var ff = document.getElementById(whoc[x]);

            ff.width=wid;

    ff.height=hei;

        }

    }

}

function zoom_in(r,s,asd)

{

  if(i<(whoc.length-1))

i++;

  else

i=0;

  whoc[i] = asd.id;

  if(asd.width >= r)

      asd.width -= imgsize;

  if(asd.height >= s)

      asd.height -= imgsize; 

  asd.width=r;

  asd.height=s;

  wid=asd.width;

  hei=asd.height;

}

function ctck()

{

var sds = document.getElementById("dum");

if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}

var sdss = document.getElementById("dumdiv");

if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}

}

</script>

</head>

<body>

<table align=center cellspacing=2 cellpadding=2 height=100% width=100%><tr>

<td align=center width=120 height=125 style='cursor:pointer;'>

<img id="myPicture1" src="http://gulf-missil.ucoz.com/_ph/20/2/474274328.gif" width="68" height="50" onMouseover="zoom_out(55,65,this)" onMouseout="zoom_in(40,48,this)"></td>

<td width=10></td>

<td align=center width=120 height=125 style='cursor:pointer;'>

<img id="myPicture2" src="http://gulf-missil.ucoz.com/_ph/20/2/873449264.gif" width="68" height="50" onMouseover="zoom_out(55,65,this)" onMouseout="zoom_in(40,48,this)"></td>

<td width=10></td>

<td align=center width=120 height=125 style='cursor:pointer;'>

<img id="myPicture3" src="http://gulf-missil.ucoz.com/_ph/14/2/605916259.gif" width="40" height="48" onMouseover="zoom_out(55,65,this)" onMouseout="zoom_in(40,48,this)"></td>

<td width=10></td>

<td align=center width=120 height=125 style='cursor:pointer;'>

<img id="myPicture4" src="http://gulf-missil.ucoz.com/_ph/20/2/289181838.gif" width="68" height="50" onMouseover="zoom_out(55,65,this)" onMouseout="zoom_in(40,48,this)"></td>

</tr>

<tr><td colspan=7>

<div align=center style="font-size: 10px;color: #dadada;" id="dumdiv">

</div>

<script language="javascript">document.onload = ctck();</script>

</td></tr>

</table>

<!-- مرور الماوس على الصوره وتكبيره -->

وسلامتكم

اقرأ المزيد
author

كود وضع هذا الامر لكشف ان موقعك او متصفحك في JavaScript

 المثال

كود ويب

<script language="JavaScript">

<!-- Hide the script from old browsers --

function browsertest () 

        {document.write("مبروك مفعل معك JavaScript ")}

// --End Hiding Here -->

</script>


<CENTER>

<SCRIPT LANGUAGE="JavaScript">

<!--

   {browsertest();} 

//-->

</SCRIPT>

</CENTER>

كود بلوجر

البحث عن

<head>


<script language="JavaScript">

<!-- Hide the script from old browsers --

function browsertest () 

        {document.write("مبروك مفعل معك JavaScript ")}

// --End Hiding Here -->

</script>


البحث عن

<body>


<CENTER>

<SCRIPT LANGUAGE="JavaScript">

<!--

   {browsertest();} 

//-->

</SCRIPT>

</CENTER>

وسلامتكم

اقرأ المزيد
author

كود بسيط يخبرك كم عدد المتواجدين بصفحاتك Number of people present

المثال

الكود

<CENTER>

<SCRIPT>

var times=history.length;

document.write(' عدد المتواجدين '+times+' الان');

</SCRIPT>

</CENTER>

وسلامتكم

اقرأ المزيد
author

التعرف على بيانات Netscape Mozilla انت تملكها

المثال
الكود
Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko

<script>

if (document.all)
var version=/MSIE \d+.\d+/

if (!document.all)
document.write("انت تستخدم "+navigator.appName+" "+navigator.userAgent)
else
document.write("انت تستخدم "+navigator.appName+" "+navigator.appVersion.match(version))

</script>
وسلامتكم
اقرأ المزيد
author

كود يكشف لغتك والتوقيت ومسار جهتك

المثال
الكود
<script>
var today=new Date()
document.write('<center>'+today.toString()+'<br>'+window.location+'</center>')
</script>
وسلامتكم
اقرأ المزيد
author

كود لعبه اوه واكس o-x

المثال

الكود
<body>
<b><font size="7">
<SCRIPT>


//if IE4/NS6, apply style
if (document.all||document.getElementById){
document.write('<style>.tictac{')
document.write('width:50px;height:50px;')
document.write('}</style>')
}

var sqr1
var sqr2
var sqr3
var sqr4
var sqr5
var sqr6
var sqr7
var sqr8
var sqr9
var sqr1T = 0
var sqr2T = 0
var sqr3T = 0
var sqr4T = 0
var sqr5T = 0
var sqr6T = 0
var sqr7T = 0
var sqr8T = 0
var sqr9T = 0
var moveCount = 0
var turn = 0
var mode = 1

function vari()
{
sqr1 = document.tic.sqr1.value
sqr2 = document.tic.sqr2.value
sqr3 = document.tic.sqr3.value
sqr4 = document.tic.sqr4.value
sqr5 = document.tic.sqr5.value
sqr6 = document.tic.sqr6.value
sqr7 = document.tic.sqr7.value
sqr8 = document.tic.sqr8.value
sqr9 = document.tic.sqr9.value
}
function check()
{
  if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
  {
    alert(" فزت !")
    reset()
  } 
  else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
  {
    alert(" فزت !")
    reset()
  } 
  else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
  {
    alert(" فزت !")
    reset()
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  {
    alert(" فزت !")
    reset()
  }
  else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
  {
    alert("You Win!")
    reset()
  }
  else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
  {
    alert("You Win!")
    reset()
  }
  else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
  {
    alert("You Win!")
    reset()
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  {
    alert("You Win!")
    reset()
  }
  else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
  {
    alert("You Win!")
    reset()
  }
  else
  {
    winCheck()
    check2()
    drawCheck()  
  } 
}

function check2()
{
  vari()
  drawCheck()
  if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
  {
    alert("لقد خسرت !")
    reset()
  } 
  else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
  {
    alert("لقد خسرت !")
    reset()
  } 
  else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  {
    alert("You Lose!")
    reset()
  }
  else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
  {
    alert("You Lose!")
    reset()
  }
}

function player1Check()
{
  if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  } 
  else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  } 
  else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
  {
    alert("Player 1 wins!")
    reset()
  }
  else
  {
    player2Check()
    drawCheck()  
  } 
}

function player2Check()
{
  vari()
  drawCheck()
  if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  } 
  else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  } 
  else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
  else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
  {
    alert("Player 2 wins!")
    reset()
  }
}

function drawCheck()
{
  vari()
  moveCount = sqr1T + sqr2T + sqr3T + sqr4T + sqr5T + sqr6T + sqr7T + sqr8T + sqr9T 
  if(moveCount == 9)
  {
    reset()
    alert(" تعادل ") 
  }
}

function winCheck()
{
  check2()
  if(sqr1 == " O " && sqr2 == " O " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr2 == " O " && sqr3 == " O " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr4 == " O " && sqr5 == " O " && sqr6T == 0 && turn == 1)
  {
    document.tic.sqr6.value = " O "
    sqr6T = 1;
    turn = 0;
  }
  else if(sqr5 == " O " && sqr6 == " O " && sqr4T == 0 && turn == 1)
  {
    document.tic.sqr4.value = " O "
    sqr4T = 1;
    turn = 0;
  }
  else if(sqr7 == " O " && sqr8 == " O " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr8 == " O " && sqr9 == " O " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr5 == " O " && sqr9 == " O " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr3 == " O " && sqr5 == " O " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr7 == " O " && sqr5 == " O " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr3 == " O " && sqr2T == 0 && turn == 1)
  {
    document.tic.sqr2.value = " O "
    sqr2T = 1;
    turn = 0;
  }
  else if(sqr4 == " O " && sqr6 == " O " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr7 == " O " && sqr9 == " O " && sqr8T == 0 && turn == 1)
  {
    document.tic.sqr8.value = " O "
    sqr8T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr7 == " O " && sqr4T == 0 && turn == 1)
  {
    document.tic.sqr4.value = " O "
    sqr4T = 1;
    turn = 0;
  }
  else if(sqr2 == " O " && sqr8 == " O " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr3 == " O " && sqr9 == " O " && sqr6T == 0 && turn == 1)
  {
    document.tic.sqr6.value = " O "
    sqr6T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr4 == " O " && sqr7 == " O " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr5 == " O " && sqr8 == " O " && sqr2T == 0 && turn == 1)
  {
    document.tic.sqr2.value = " O "
    sqr2T = 1;
    turn = 0;
  }
  else if(sqr6 == " O " && sqr9 == " O " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr4 == " O " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr2 == " O " && sqr5 == " O " && sqr8T == 0 && turn == 1)
  {
    document.tic.sqr8.value = " O "
    sqr8T = 1;
    turn = 0;
  }
  else if(sqr3 == " O " && sqr6 == " O " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr1 == " O " && sqr9 == " O " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr3 == " O " && sqr7 == " O " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else
  {
    computer()
  }
  check2()
}
function computer()
{
  check2()
  if(sqr1 == " X " && sqr2 == " X " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr2 == " X " && sqr3 == " X " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr4 == " X " && sqr5 == " X " && sqr6T == 0 && turn == 1)
  {
    document.tic.sqr6.value = " O "
    sqr6T = 1;
    turn = 0;
  }
  else if(sqr5 == " X " && sqr6 == " X " && sqr4T == 0 && turn == 1)
  {
    document.tic.sqr4.value = " O "
    sqr4T = 1;
    turn = 0;
  }
  else if(sqr7 == " X " && sqr8 == " X " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr8 == " X " && sqr9 == " X " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr5 == " X " && sqr9 == " X " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr3 == " X " && sqr5 == " X " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr7 == " X " && sqr5 == " X " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr3 == " X " && sqr2T == 0 && turn == 1)
  {
    document.tic.sqr2.value = " O "
    sqr2T = 1;
    turn = 0;
  }
  else if(sqr4 == " X " && sqr6 == " X " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr7 == " X " && sqr9 == " X " && sqr8T == 0 && turn == 1)
  {
    document.tic.sqr8.value = " O "
    sqr8T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr7 == " X " && sqr4T == 0 && turn == 1)
  {
    document.tic.sqr4.value = " O "
    sqr4T = 1;
    turn = 0;
  }
  else if(sqr2 == " X " && sqr8 == " X " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr3 == " X " && sqr9 == " X " && sqr6T == 0 && turn == 1)
  {
    document.tic.sqr6.value = " O "
    sqr6T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr4 == " X " && sqr7 == " X " && sqr1T == 0 && turn == 1)
  {
    document.tic.sqr1.value = " O "
    sqr1T = 1;
    turn = 0;
  }
  else if(sqr5 == " X " && sqr8 == " X " && sqr2T == 0 && turn == 1)
  {
    document.tic.sqr2.value = " O "
    sqr2T = 1;
    turn = 0;
  }
  else if(sqr6 == " X " && sqr9 == " X " && sqr3T == 0 && turn == 1)
  {
    document.tic.sqr3.value = " O "
    sqr3T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr4 == " X " && sqr7T == 0 && turn == 1)
  {
    document.tic.sqr7.value = " O "
    sqr7T = 1;
    turn = 0;
  }
  else if(sqr2 == " X " && sqr5 == " X " && sqr8T == 0 && turn == 1)
  {
    document.tic.sqr8.value = " O "
    sqr8T = 1;
    turn = 0;
  }
  else if(sqr3 == " X " && sqr6 == " X " && sqr9T == 0 && turn == 1)
  {
    document.tic.sqr9.value = " O "
    sqr9T = 1;
    turn = 0;
  }
  else if(sqr1 == " X " && sqr9 == " X " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else if(sqr3 == " X " && sqr7 == " X " && sqr5T == 0 && turn == 1)
  {
    document.tic.sqr5.value = " O "
    sqr5T = 1;
    turn = 0;
  }
  else
  {
    AI()
  }
  check2()
}

function AI()
{
  vari()
  if(document.tic.sqr5.value == "     " && turn == 1)
  {
    document.tic.sqr5.value = " O "
    turn = 0
    sqr5T = 1
  }
  else if(document.tic.sqr1.value == "     " && turn == 1)
  {
    document.tic.sqr1.value = " O "
    turn = 0
    sqr1T = 1
  }
  else if(document.tic.sqr9.value == "     " && turn == 1)
  {
    document.tic.sqr9.value = " O "
    turn = 0
    sqr9T = 1
  }
  else if(document.tic.sqr6.value == "     " && turn == 1)
  {
    document.tic.sqr6.value = " O "
    turn = 0
    sqr6T = 1
  }
  else if(document.tic.sqr2.value == "     " && turn == 1)
  {
    document.tic.sqr2.value = " O "
    turn = 0
    sqr2T = 1
  }
  else if(document.tic.sqr8.value == "     " && turn == 1)
  {
    document.tic.sqr8.value = " O "
    turn = 0
    sqr8T = 1
  }
  else if(document.tic.sqr3.value == "     " && turn == 1)
  {
    document.tic.sqr3.value = " O "
    turn = 0
    sqr3T = 1
  }
  else if(document.tic.sqr7.value == "     " && turn == 1)
  {
    document.tic.sqr7.value = " O "
    turn = 0
    sqr7T = 1
  }
  else if(document.tic.sqr4.value == "     " && turn == 1)
  {
    document.tic.sqr4.value = " O "
    turn = 0
    sqr4T = 1
  }
  check2()
}

function reset()
{
  document.tic.sqr1.value = "     "
  document.tic.sqr2.value = "     "
  document.tic.sqr3.value = "     "
  document.tic.sqr4.value = "     "
  document.tic.sqr5.value = "     "
  document.tic.sqr6.value = "     "
  document.tic.sqr7.value = "     "
  document.tic.sqr8.value = "     "
  document.tic.sqr9.value = "     "
  sqr1T = 0
  sqr2T = 0
  sqr3T = 0
  sqr4T = 0
  sqr5T = 0
  sqr6T = 0
  sqr7T = 0
  sqr8T = 0
  sqr9T = 0
  vari()
  turn = 0
  moveCount = 0
}

function resetter()
{
  reset()
}
</SCRIPT>

</font></b>

<FORM NAME="tic" method="post">
<p align="center"><font size="7">
<INPUT TYPE="button" NAME="sqr1" class="tictac" value="     " onClick="if(document.tic.sqr1.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 1; vari(); check();} else if(document.tic.sqr1.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr1.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr1.value = ' O '; sqr1T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr2" class="tictac" value="     " onClick="if(document.tic.sqr2.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 1; vari(); check();} else if(document.tic.sqr2.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr2.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr2.value = ' O '; sqr2T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr3" class="tictac" value="     " onClick="if(document.tic.sqr3.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 1; vari(); check();} else if(document.tic.sqr3.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr3.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr3.value = ' O '; sqr3T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b><br />
</b>
<INPUT TYPE="button" NAME="sqr4" class="tictac" value="     " onClick="if(document.tic.sqr4.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 1; vari(); check();} else if(document.tic.sqr4.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr4.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr4.value = ' O '; sqr4T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr5" class="tictac" value="     " onClick="if(document.tic.sqr5.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 1; vari(); check();} else if(document.tic.sqr5.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr5.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr5.value = ' O '; sqr5T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr6" class="tictac" value="     " onClick="if(document.tic.sqr6.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 1; vari(); check();} else if(document.tic.sqr6.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr6.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr6.value = ' O '; sqr6T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b><br />
</b>
<INPUT TYPE="button" NAME="sqr7" class="tictac" value="     " onClick="if(document.tic.sqr7.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 1; vari(); check();} else if(document.tic.sqr7.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr7.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr7.value = ' O '; sqr7T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr8" class="tictac" value="     " onClick="if(document.tic.sqr8.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 1; vari(); check();} else if(document.tic.sqr8.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr8.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr8.value = ' O '; sqr8T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b>
<INPUT TYPE="button" NAME="sqr9" class="tictac" value="     " onClick="if(document.tic.sqr9.value == '     ' && turn == 0 && mode == 1) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 1; vari(); check();} else if(document.tic.sqr9.value == '     ' && turn == 1 && mode == 2) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr9.value == '     ' && turn == 0 && mode == 2) {document.tic.sqr9.value = ' O '; sqr9T = 1; turn = 1; vari(); player1Check()} drawCheck()" style="font-weight: 700"><b>
</b></font></p>
</form>

المشاهده كود لعبه اوه واكس o-x هنا

https://blog-hkrkoz.blogspot.com/p/o-x.html

وسلامتكم

اقرأ المزيد
author

كود The Game of Tetris لعبة تتريس

المثال

الكود

<div align=center>

<script language="JavaScript">


var fixtime=120000; // Set time in Milliseconds


var delay = 100;

var startd,timera;

var oldv=0;

var rows = 25;

var cols = 11;

var count = rows*cols;

var total = rows*cols;

var speeda = 350;

var speedb = 350;

var inc_score = 20;

var bonus2,bonus3,bonus4;

var timerx;

var df  = new Array(total);

var dfc = new Array(total);

var cells1=new Array(4);

var temp1 = new Array(4);

var test1 = 246;

var down1 = 0;

var ran;

var ranc;

var rowsclear=0;

var score2=0;

var time_final;

var inc_time=10000;

var mtime_check=1;

var moves=0;

var times=0;

var finished = 0;

var firstmove = 0;

var timee = 0

var ur = document.location.href;

if ( ur.indexOf("?") != -1 ){

 var a = ur.split("=");

 var level = a[1];

}

else {

 level = 2;

}

for(var x=0; x<df.length; x++) {

df[x] = 0;

}

for(var x=0; x<dfc.length; x++) {

dfc[x] = 8;

}

if (level<=5) {

speeda=speeda-(level*50);

speedb=speedb-(level*50);

inc_score=inc_score+(level*10);

bonus2=inc_score*2;

bonus3=inc_score*3;

bonus4=inc_score*4;

}

document.onkeydown = downfunc;


function timer() {

    var f = new Date();

    var fg = f.valueOf();

    if(oldv==0)

startd = fg-1;

    var gap = fg-startd;

    if(oldv>gap){

refresh();

return;

    }else{

timee = gap;

    }

    oldv = gap;

    var ede = eval("document.getElementById('tim')");

    ede.value=timee;

    if(finished == 0)

     timera = self.setTimeout("timer()", delay);

}

function move()

{

  mtime_check = (fixtime+rowsclear*inc_time-timee)/1000;

  var as1 = document.op;

  as1.mtime.value=mtime_check;

  

  if (df[235]==1)

  areset();

  

  if (mtime_check > 0.05)

  {

  stop = false;

  for(var y=0; y<cells.length; y++)

  {

    var cellno = cells[y];

    

    if(cellno >= 0)

{

       if(df[cellno-cols] == 1 || cellno-cols < 0)

   {    

          stop = true;

   }

}

  }

  if(stop == true)

  {

    for(var y=0; y<cells.length; y++)

{

var cellno = cells[y];       

        if(cellno >= 0)

        {

   df[cellno] = 1;

   dfc[cellno]= ranc;

}

  }

 

  var firstrowpos = true;

  var sd_temp=0;

  var rowcount=0;

  for(var sd=0; sd<=rows; sd++)

{

      var pos1 = sd*cols;

      var pos2 = true;

 

if (sd!=rows)

{

  for(var s=pos1;s<pos1+cols;s++)

{

  if(df[s]!=1)

  pos2 = false;

}

}

else if (sd==rows)

        pos1=sd_temp*cols;

for(var s=pos1;s<(pos1+cols);s++)

{

  if(df[s]!=1)

  pos2 = false;

}

if (pos2== true)

{

  sd=sd_temp;

  if(rowcount==1)

     score2=score2+bonus2;

  else if (rowcount==2)

score2=score2+bonus3;

  else if (rowcount==3)

score2=score2+bonus4;

}

}

           

if(pos2 == true)  //remove rows and reset values

{

         if (firstrowpos == true)

         {

  firstrowpos = false;

  sd_temp=sd;

   }

   rowsclear=rowsclear+1;

   rowcount=rowcount+1;

   score2=score2+inc_score;

   time_final=time_final+10000; 

   var as = document.op;

   as.level1.value=level;

   as.sw.value=rowsclear;

   as.score1.value=score2;

       for(var gh=0; gh<cols; gh++)

   {

       df[pos1+gh] = 0;

       dfc[pos1+gh] = 8;

       var ded = document.getElementById(pos1+gh);

               ded.style.backgroundColor = "white";

   }

   for(var sdfsdf=sd+1; sdfsdf<rows; sdfsdf++)

   {

       for(var gh=0; gh<cols; gh++)

   {

         oldcol = (sdfsdf*cols)+gh;

         newcol = (sdfsdf*cols)+gh-cols;

if(df[oldcol] == 1)

{

         var ded = document.getElementById(oldcol);

                 ded.style.backgroundColor = "white";

      df[newcol] = df[oldcol];

      dfc[newcol] = dfc[oldcol];

      df[oldcol] = 0;

      dfc[oldcol] = 8;

  ded = document.getElementById(newcol);

            ded.style.backgroundColor =change_color(dfc[newcol]);

             }

               }

     }

}

}

 

  }

  else

  {

     for(var y=0; y<cells.length; y++)

{

    var cellno = cells[y];       

        var ded = document.getElementById(cellno);

        ded.style.backgroundColor = "white";

     }

     for(var y=0; y<cells.length; y++)

{

var cellno = cells[y];       

        cells[y] = parseInt(cellno)-cols;

        ded = document.getElementById(cells[y]);

        ded.style.backgroundColor = change_color(ranc);

     }

  }

 

  if(stop != true)

  {

    timerx = setTimeout('move()',speeda);

  }

  else

  {

    speeda =speedb;

    areset();

  }

   }// check if 

   else

   {

var pos = (count-cols)-(i*cols)+j;

document.getElementById("tim").disabled =  true; 

document.getElementById("mtime").disabled =  true;

         document.getElementById("score1").disabled = true;

         document.getElementById("level1").disabled = true;

         document.getElementById("check2").disabled = true;

     

     moves = score2;  //the total No. of tries can be displayed to score 

     finished=1;

}

}

function downfunc(e)

{

  if (!e) var e = window.event;

  if (e.keyCode) x = e.keyCode;

  else if (e.which) x = e.which;


  if(x == 39)// -->

  {

      

if(((cells[cells.length-1]+1)%cols != 0)&& (df[(cells[cells.length-1]+1)]==0))

{

for(var y=cells.length; y>=0; y--)

{

    var cellno = cells[y];

        if(((cellno > 0)) && (((cells[cells.length]))!=1))

{

         var ded = document.getElementById(cellno);

ded.style.backgroundColor = "white";

cells[y] = parseInt(cellno)+1;

         var ded1 = document.getElementById(cells[y]);

         ded1.style.backgroundColor = change_color(ranc);   


}

}

}

   }

   else if (x==37)  //<--

   {

     

if(((cells[0])%cols != 0)&& (df[(cells[0]-1)]==0)) {

  for(var y=0; y<cells.length; y++)

{

    var cellno = cells[y];

if((cellno > 0))

{

         var ded = document.getElementById(cellno);

         ded.style.backgroundColor = "white";

cells[y] = parseInt(cellno)-1;

         ded = document.getElementById(cells[y]);

         ded.style.backgroundColor = change_color(ranc);    

}

}

}

   }

   else if (x==40)

   {

speeda = 50;  

   }

   else if (x==38)

   {

//temparray = new Array(test1,test1-cols,test1+1,test1+2);

if(ran==1)

{

   

    //alert(cells)

   if ((df[(cells[1]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&((cells[0]-cells[1])==cols)&&((cells[2]-cells[0])==1)&&((cells[3]-cells[2])==1))//

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[1]);

       ded.style.backgroundColor = "white";

     cells[0]=cells[0]+(cols);

   cells[1]=cells[0]+1;

   cells[2]=cells[0]+1-cols;

   cells[3]=cells[0]+1-2*cols;

   

   }

   else if(((cells[3]+1)%cols!=0)&&((cells[1]-cells[0])==1)&& ((cells[1]-cells[2])==cols)&& ((cells[2]-cells[3])==cols) )

   {

 

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   cells[2]=cells[0]+2;

   cells[3]=cells[2]+cols;

   

   }

   else if(((cells[1]-cells[0])==1)&& ((cells[2]-cells[1])==1)&& ((cells[3]-cells[2])==cols) )

   {

       var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[1]=cells[0]+cols;

   cells[2]=cells[1]+cols;

   cells[3]=cells[0]+1;

   

   }

   else if((df[(cells[0]-cols)]==0)&&(df[(cells[0]-(2*cols))]==0)&&((cells[1]-cells[0])==cols)&& ((cells[2]-cells[1])==cols)&& ((cells[3]-cells[0])==1) )

   {

       

//alert(cells)

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       var ded = document.getElementById(cells[1]);

       ded.style.backgroundColor = "white";

       cells[0]=cells[0];

       cells[1]=cells[0]-cols;

       cells[2]=cells[0]+1;

   cells[3]=cells[0]+2;

   

   }

}

else if(ran==2)

{

//temparray = new Array(test1,test1+1,test1+2,test1+2-cols);

   

   if ((df[(cells[0]-cols)]==0)&&(df[(cells[0]-(2*cols))]==0)&&(df[(cells[0]-(3*cols))]==0)&&(df[(cells[0]+1)]==0)&&((cells[1]-cells[0])==1)&&((cells[2]-cells[1])==1)&&((cells[2]-cells[3])==cols))

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[1]= cells[0]-cols;

   cells[2]= cells[0]-2*cols;

   cells[3]= cells[0]+1;

   

   }

   else if((df[(cells[0]+cols)]==0)&&(df[(cells[0]+1)]==0)&&(df[(cells[0]+2)]==0)&&((cells[3]+1)%cols!=0)&&((cells[0]-cells[1])==cols)&& ((cells[1]-cells[2])==cols)&& ((cells[3]-cells[0])==1) )

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

   cells[1]=cells[0]+cols;

   cells[2]=cells[0]+1;

   cells[3]=cells[0]+2;

   }

   else if(((cells[1]-cells[0])==cols)&& ((cells[2]-cells[0])==1)&& ((cells[3]-cells[0])==2) )

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[1]);

       ded.style.backgroundColor = "white";

       cells[1] = cells[0]+1;

   cells[2]=cells[1]+cols;

   cells[3]=cells[2]+cols;

   }

   else if(((cells[3]+1)%cols!=0)&&((cells[1]-cells[0])==1)&& ((cells[2]-cells[1])==cols)&& ((cells[3]-cells[2])==cols) )

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[0]=cells[0];

       cells[1]=cells[0]+1;

       cells[2]=cells[0]+2;

   cells[3]=cells[2]-cols;

   }

}

else if(ran==3)

{

   

   if ((df[(cells[1]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&((cells[1]-cells[0])==1)&&((cells[2]-cells[1])==cols)&&((cells[3]-cells[1])==1))

   {

   var ded = document.getElementById(cells[0]);

       ded.style.backgroundColor = "white";

       cells[0]=cells[1]-cols;

   cells[1]=cells[0]+cols;

   cells[2]=cells[0]+2*cols;

   cells[3]=cells[1]+1;

  // alert(cells)

  

   }

   else if((df[(cells[1]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&((cells[3]+1)%cols!=0)&&((cells[1]-cells[0])==cols)&& ((cells[2]-cells[1])==cols)&& ((cells[3]-cells[1])==1) )

   {

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[0]=cells[1]-1;

       cells[2]=cells[1]-cols;

      

  /* cells[0] = cells[0]+2*cols;

   cells[1] = cells[0]+1;

   cells[2] = cells[1]-cols;

   cells[3] = cells[0]+2;*/

   }

   else if((df[(cells[1]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&((cells[1]-cells[0])==1)&& ((cells[1]-cells[2])==cols)&& ((cells[3]-cells[1])==1))

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   cells[3]=cells[1]+cols;

   

   }

   else if(((cells[3]+1)%cols!=0)&&((cells[1]-cells[0])==1)&& ((cells[1]-cells[2])==cols)&& ((cells[3]-cells[1])==cols) )

   {

       var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[1]=cells[0]+1;

       cells[2]=cells[1]+cols;

   cells[3]=cells[1]+1;

   }

}

else if(ran==4)

{

   

//  alert(cells);

   if ((df[(cells[0]+1-cols)]==0)&&(df[(cells[0]+1-(2*cols))]==0)&&(df[(cells[0]+2-cols)]==0)&&(df[(cells[0]+2-(2*cols))]==0)&&((cells[3]+1)%cols!=0)&&((cells[0]-cells[1])==cols)&&((cells[2]-cells[0])==1)&&((cells[3]-cells[2])==cols))

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   cells[1] = cells[0]+1;

   cells[2] = cells[1]-cols;

   cells[3] = cells[2]+1;

   

   }

   else if((df[(cells[0]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&(df[(cells[2]+cols)]==0)&&(df[(cells[2]+(2*cols))]==0)&&((cells[1]-cells[0])==1)&& ((cells[1]-cells[2])==cols)&& ((cells[3]-cells[2])==1) )

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

   cells[1] = cells[0]-cols;

   cells[2] = cells[0]+1;

   cells[3] = cells[2]+cols;

   

   }

  

}

else if(ran==5)

{

  // alert(cells) 

   if((df[(cells[0]-cols)]==0)&&(df[(cells[0]+cols)]==0)&&(df[(cells[0]+(2*cols))]==0)&&(df[(cells[0]+(3*cols))]==0)&&((cells[1]-cells[0])==1)&& ((cells[2]-cells[0])==2)&&((cells[2]-cells[1])==1)&&((cells[3]-cells[2])==1))

   {

   var ded = document.getElementById(cells[3]);

     ded.style.backgroundColor = "white";

     var ded = document.getElementById(cells[2]);

         ded.style.backgroundColor = "white";

         var ded = document.getElementById(cells[1]);

         ded.style.backgroundColor = "white";

         

         

         cells[1]=cells[0]+cols;

         cells[2]=cells[1]+cols;

         cells[3]=cells[2]+cols;

   /*cells[0]=cells[0]+2*cols;

   cells[1]=cells[0]+cols;

   cells[2]=cells[0]-cols;

   cells[3]=cells[0]-2*cols;*/

   }

   else if((df[(cells[0]+1)]==0)&&(df[(cells[0]+2)]==0)&&(df[(cells[0]+3)]==0)&&((cells[1]-cells[0])==cols)&&((cells[2]-cells[1])==cols)&&((cells[2]-cells[0])==2*cols)&&((cells[3]-cells[2])==cols))

   {

   

   var ded = document.getElementById(cells[3]);

     ded.style.backgroundColor = "white";

     var ded = document.getElementById(cells[2]);

         ded.style.backgroundColor = "white";

         var ded = document.getElementById(cells[1]);

         ded.style.backgroundColor = "white";

   

   cells[0]=cells[0];

   cells[1]=cells[0]+1;

   cells[2]=cells[0]+2;

   cells[3]=cells[0]+3;

   }

}

else if(ran==6)

{

  //alert(cells);

  

  if ((df[(cells[0]+1)]==0)&&(df[(cells[0]+1+cols)]==0)&&(df[(cells[0]+cols+2)]==0)&&((cells[3]+1)%cols!=0)&&((cells[0]-cells[1])==cols)&&((cells[2]-cells[1])==1)&&((cells[2]-cells[3])==cols))    

   {

   var ded = document.getElementById(cells[3]);

     ded.style.backgroundColor = "white";

   cells[1] = cells[0]+1;

   cells[2] = cells[1]+cols;

   cells[3] = cells[2]+1;

   }

   else if((df[(cells[0]+cols)]==0)&&(df[(cells[1]-cols)]==0)&&(df[(cells[1]-(2*cols))]==0)&&((cells[1]-cells[0])==1)&& ((cells[2]-cells[1])==cols)&& ((cells[3]-cells[2])==1) )

   {

   var ded = document.getElementById(cells[3]);

     ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

       cells[1] = cells[0];

       cells[0] = cells[1]+cols;

       cells[2] = cells[1]+1;

       cells[3] = cells[2]-cols;

   }

}

else if(ran==7)

{

  //new Array( test2,test2-cols2,test2+1,test2+2,test2+2-cols2);

  

   if((df[(cells[0]+1)]==0)&&(df[(cells[0]+1-cols)]==0)&&(df[(cells[0]+1-(2*cols))]==0)&&((cells[0])%cols!=0)&&((cells[0]-cells[1])==cols)&&((cells[2]-cells[0])==1)&&((cells[3]-cells[2])==1)&&((cells[3]-cells[4])==cols))

   {

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

       var ded = document.getElementById(cells[4]);

       ded.style.backgroundColor = "white";

       cells[1]=cells[0]+1;

       cells[2]=cells[1]-cols;

       cells[4]=cells[2]-cols;

       cells[3]=cells[4]-1;

   }

   else if((df[(cells[1]-cols)]==0)&&(df[(cells[1]-cols-1)]==0)&&(df[(cells[1]-cols-2)]==0)&&(df[(cells[1]-2)]==0)&&((cells[0])%cols!=0)&&((cells[1]-cells[0])==1)&&((cells[2]-cells[4])==cols)&&((cells[4]-cells[3])==1)&&((cells[0]-cells[3])==2*cols))

   {

     

   var ded = document.getElementById(cells[0]);

       ded.style.backgroundColor = "white";

  

   cells[4]=cells[1];

   cells[3]=cells[4]-cols;

   cells[2]=cells[3]-1;

   cells[1]=cells[2]-1;

   cells[0]=cells[1]+cols;

   //alert(cells)

   

   }

   else if((df[(cells[0]+1)]==0)&&(df[(cells[0]+cols)]==0)&&(df[(cells[0]+(2*cols))]==0)&&(df[(cells[0]+(2*cols)+1)]==0)&&((cells[0]-cells[1])==cols)&&((cells[2]-cells[1])==1)&&((cells[3]-cells[2])==1)&&((cells[4]-cells[3])==cols))

   {

 

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

       var ded = document.getElementById(cells[4]);

       ded.style.backgroundColor = "white";

   cells[1]=cells[0]+1;

   cells[2]=cells[0]+cols;

   cells[3]=cells[2]+cols;

   cells[4]=cells[3]+1;

   }

   

   else if((df[(cells[0]-cols)]==0)&&(df[(cells[0]+1)]==0)&&(df[(cells[0]+2)]==0)&&(df[(cells[0]+2-cols)]==0)&&((cells[3]-cells[2])==cols)&&((cells[1]-cells[0])==1)&&((cells[3]-cells[2])==cols)&&((cells[4]-cells[3])==1))

   {

     var ded = document.getElementById(cells[2]);

       ded.style.backgroundColor = "white";

   var ded = document.getElementById(cells[3]);

       ded.style.backgroundColor = "white";

       var ded = document.getElementById(cells[4]);

       ded.style.backgroundColor = "white";

 

   cells[1]=cells[0]-cols;

   cells[2]=cells[0]+1;

   cells[3]=cells[2]+1;

   cells[4]=cells[3]-cols;

   }

}

   }

}

var temparray = new Array(test1,test1-cols,test1+1,test1+1-cols);

    var tran = 0;

    var tranc = 0;

    

function areset()

{

      if(finished == 0) // for time start

  {

   document.getElementById("tim").disabled =  false;

   document.getElementById("mtime").disabled =  false;

           document.getElementById("score1").disabled = false;

           document.getElementById("level1").disabled = false;

           document.getElementById("check2").disabled = false;

           document.op.level1.focus();

           

   if(firstmove == 0)

   {

   timer();

   firstmove++;

   }

      }

      

  cells = new Array(temparray.length);

  

  for( var xa=0; xa<temparray.length; xa++)

  {

     cells[xa] = temparray[xa];

    }

    

  ran   = tran;

  ranc  = tranc;

  

  if(level<=4)

  tran  = Math.round(Math.random()*6);

  else 

    tran  = Math.round(Math.random()*7);

    

  tranc = Math.round(Math.random()*8);

   // 123

//  tran=7;

  

  if(tran == 0)// 2x2 box

  {

    temparray = new Array(test1,test1-cols,test1+1,test1+1-cols);

  }

  else if(tran == 1)  ///L  bolow 1 col then  3 row 

  {

    temparray = new Array(test1,test1-cols,test1+1,test1+2);   

  }

  else if(tran == 2) ///L    3 row then  bolow 1 col 

  {

    temparray = new Array(test1,test1+1,test1+2,test1+2-cols);   

  }

  else if(tran == 3) // down T   3row and center up 1 col 

  {

    temparray = new Array(test1,test1+1,test1+1+cols,test1+2);   

  }

  else if(tran == 4)  // Z  down 1 col 2 row and up 1 col 

  {

    temparray = new Array(test1,test1-cols,test1+1,test1+1+cols);   

  }

  else if(tran == 5)//4 cell striaght line

  {

    

    temparray = new Array(test1,test1+1,test1+2,test1+3);

  }

  else if(tran == 6)// Z  up 1 cols and 2 row and down 1 cols

  {

    temparray = new Array(test1+cols,test1,test1+1,test1+1-cols);   

  }

  else if(tran == 7)//cup cell  only level 5

  {

    temparray = new Array(test1,test1-cols,test1+1,test1+2,test1+2-cols);

  }


  display_next();

     

  var fixed_time=fixtime+rowsclear*inc_time;   

  time_final=(fixed_time-timee)/1000;

     

  if((df[test1[0]]!= 1)&& (df[235]!=1)&& (time_final > 0.05))

  {

move();

  }

 

     if ((df[235]==1)||(time_final< 0.05))

      {

     document.getElementById("tim").disabled =  true;

document.getElementById("mtime").disabled =  true;

         document.getElementById("score1").disabled = true;

         document.getElementById("level1").disabled = true;

         document.getElementById("check2").disabled = true;     

     // for the getting the display code the header,footer and topscore

moves = score2;  //the total No. of tries can be displayed to score 

finished=1;

  }

 

}

function display_next()

{

var i,j;

var cols2=4;

var test2;

for (i=0; i<4; i++)

for (j=0; j<4; j++)

{

///df1[(i*4)+j]=0;

var dd = document.getElementById('xx'+((i*4)+j));

dd.style.backgroundColor = "#EEEEEE";//"B3FFFF";

}

switch(tran)

{

  

  

  case 0: test2=9;

  cells2 = new Array(test2,test2-cols2,test2+1,test2+1-cols2);

  break;

 

  case 1: test2=9;

  cells2 = new Array(test2,test2-cols2,test2+1,test2+2);

  break;


  case 2: test2=8;

  cells2 = new Array(test2,test2+1,test2+2,test2+2-cols2);

  break;

 

  case 3: test2=5;

  cells2 = new Array(test2,test2+1,test2+1+cols2,test2+2);

  break;

 

  case 4: test2=5;

  cells2 = new Array(test2,test2-cols2,test2+1,test2+1+cols2);

  break;

 

  case 5: test2=4;  

  cells2 = new Array( test2,test2+1,test2+2,test2+3);

  break;

 

  case 6: test2=5;

  cells2 = new Array(test2+cols2,test2,test2+1,test2+1-cols2);

  break;

 

  case 7: test2=9;  

      cells2 = new Array( test2,test2-cols2,test2+1,test2+2,test2+2-cols2);

  break;

 

}

for(var y=0; y<cells2.length; y++)

{

        var ded1 = document.getElementById('xx'+cells2[y]);

        ded1.style.backgroundColor = change_color(tranc);

    }

  }

  

function change_color(n)

{

   // n=6;

if (n==0) // brown

    {

  return "#A52A2A";

}

else if (n==1) // blue-violet

    {

  return "#8040FF";

}

else if (n==2)// green

    {

  return "#009F00"

}

else if (n==3)// blue

{

  return "#0000ff";  //#6677AA,,cABE62

}

else if (n==4)// Magenta

{

  return "#ff00ff";

}

else if (n==5) // purple

{

  return "#800080";

}

else if (n==6) // olive

{

  return "#808000";

}

else if (n==7)// Red

{

  return "#FF3B01";//FF3127C";

}

else if (n==8)// orange

{

  return "#FFAC01";

}

}

function refresh()

{

document.location.reload();

}

</script>

<tr><td bgcolor=white align=center valign=top> 

<form name=op method="post" action="index.php">

<strong><font color="#FF0000" size=3><b>The Game of Tetris لعبة تتريس</b></font></strong> <br>

<table  border=1>

    <tr> 

      <td > 

      

      <table style="border: 1px solid black;"  align=center  bgcolor= white>

      

<script language=javascript>

document.open("text/plain");

        var count = rows*cols;    

for(var i=0; i<rows; i++)

{

document.write("<tr>");

for(var j=0; j<cols; j++)

{

var pos = (count-cols)-(i*cols)+j;

if(pos == 274)

document.write("<td name=a"+pos+" id="+pos+" style=\"border: 1 px solid black; width:15px; height: 15px; font-size: 8px;\"><a style=\"text-decoration:none;\" href=&nbsp;&nbsp;</a></td>");

else

document.write("<td name=a"+pos+" id="+pos+" style=\"border: 1 px solid black; width:15px; height: 15px; font-size: 8px;\">&nbsp;</td>");

}

document.write("</tr>");

}

document.close();

</script>

       </table>


    </td>

      <td style="border: 1px solid black; background-color: #eceded "> <!--set bg for column two-->

  <table  align="center">

            <tr align="center"> 

                <td >

                

                <input type=button name="start11" id="start11" value="بدايه" onclick="areset()"  style="margin-right: 10px; color: #FF0000;  font-family: arial; font-weight: bold;  border: 1px dashed #008000;">

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<input type=button name="refresh1" id="refresh1" value=إعاده onclick=refresh() style="margin-right: 10px; color: #FF0000;  font-family: arial; font-weight: bold;  border: 1px dashed #008000;">

                

                <br><br>

                </td>

            </tr>

            <tr><td>

<b><font color=green size=2>اختار مستوى</font></b><br>

<input type="radio" id=myid1 name=myradio onclick="window.location.href='?level=1'">1

<input type="radio" id=myid2 name=myradio onclick="window.location.href='?level=2'">2

<input type="radio" id=myid3 name=myradio onclick="window.location.href='?level=3'">3

<input type="radio" id=myid4 name=myradio onclick="window.location.href='?level=4'">4

<input type="radio" id=myid5 name=myradio onclick="window.location.href='?level=5'">5

<br><br>

</td></tr>

            <tr> 

                <td >

               <b><font color=Green size=2>مستوي :</font></b> <input size=1 type=text id="level1" name=level1 value=0  style="color: red;  text-align: center; font-size: 16 px; font-family: arial; font-weight:  bold; border: 1px solid green;" disabled>  &nbsp;&nbsp;&nbsp;

                <b><font color=green size=2>تم مسح الصفوف :</font></b> <input size=4 type=button id="check2" name=sw value=0  style="color: red; font-size: 16 px; font-family: arial; font-weight: bold; border: 1px solid green;" disabled> <br> <br> 

                

                <strong><b><font color=green size=2>نتيجة :</font></b></strong> </b>  <input size=4 type=button id="score1" name=score1 value=0 style="color: red; font-size: 16 px; font-family: arial; font-weight: bold; border: 1px solid green;" disabled>&nbsp;&nbsp;&nbsp;

                &nbsp;&nbsp;<b><font color=green size=2>وقيت :</font></b>  <input type=button name=timename id=tim value=0 style="color: red; font-size: 16 px; font-family: arial; font-weight: bold; border: 1px solid green;"disabled>

                <br><br><br>

                <font color=green size=2>الوقت المتبقي :</font></b> <input type=button id="mtime" name=score11 value=60 style="color: red; font-size: 19 px; font-family: arial; font-weight: bold; border: 1px solid green;" disabled>&nbsp;&nbsp;&nbsp;<font color=green size=-1>ثواني</font>

                

                <br><br>

                </td>

            </tr>

            <tr> 

            <td align="center"> 

              <table border="0" bordercolor=red>

                <tr>

                  <td align="center">

  <table border="0"  bgcolor="#EEEEEE">

<div align=center>التالي</div>

<script language=javascript>

document.open("text/plain");    

    var rows1=4;

var cols1=4;  //B3FFFF

for(var i=0; i<rows1; i++)

{

document.write("<tr>");

for(var j=0; j<cols1; j++)

{

var pos1 =12-(i*cols1)+j;

document.write("<td  name=x"+pos1+" id=xx"+pos1+" width=16 height=16></td>");

}

document.write("</tr>");

}

document.close();


</script>

                  </table>

     </td>

                   </tr>

                </table>

  

  </td></tr>            

       </table> 

   </td></tr>            

       </table> 

<script language=javascript>    

switch(parseInt(level)) {

  case 1: document.getElementById("myid1").checked=true;

break;

      case 2: document.getElementById("myid2").checked=true;

break;      

      case 3: document.getElementById("myid3").checked=true;

break;      

      case 4: document.getElementById("myid4").checked=true;

break;      

      case 5: document.getElementById("myid5").checked=true;

break;      

}

document.op.level1.value=level;

document.op.sw.value=rowsclear;

document.op.score1.value=rowsclear*inc_score;

document.op.mtime.value=fixtime/1000;     

</script>     

</form>

</div>

المشاهده كود The Game of Tetris لعبة تتريس هنا

https://blog-hkrkoz.blogspot.com/p/game-of-tetris.html

وسلامتكم

اقرأ المزيد
author

آلتآريخ هجري وميلآدي

المتابعون