[Script] Magic Square

Scripturi PHP si HTML!
Avatar utilizator
DarkArms
Membru
Mesaje: 3107
Localitate: Reșița, România
Nick server: cleks
Contact:

[Script] Magic Square

Mesaj de DarkArms » Vin Dec 30, 2016 1:10 pm

Cod: Selectaţi tot

<title>Magic Square</title>
<style type="text/css">
body,td,th {
    color: #000;
}
body {
    background-color: #FFF;
}
</style>
<body bgcolor="#CCCCCC"><P style="FONT-SIZE: 13px">
<STYLE type=text/css>.num {
    FONT-SIZE: 12px; WIDTH: 30px; COLOR: #000; FONT-FAMILY: verdana; TEXT-ALIGN: right
}
.symbols {
    FONT-SIZE: 30px; BACKGROUND: #000; COLOR: #f1f1f1; FONT-FAMILY: wingdings; TEXT-ALIGN: center
}
.viewsymbol {
    FONT-SIZE: 100px; BACKGROUND: #000; WIDTH: 150px; COLOR: #f1f1f1; FONT-FAMILY: wingdings; HEIGHT: 150px
}
</STYLE>

<SCRIPT language=javascript type=text/javascript>
<!--//
ax=0;

function viewtable() {
  ax=Math.round(Math.random()*26);
  alphaArray=new Array("a", "n", "b", "d", "f", "h", "{", "i", "l", "v", "x", "z", "I", "J", "M", "N", "o", "O", "R", "S", "T", "U", "m", "6", "^", "u",

"_", "[", "]");
  table="<table align=\"center\" border=\"0\" cellspacing=\"5\" cellpadding=\"1\"><tr>";
  j=1;
  for ( i = 99 ; i >= 0 ; i-- ) {
     a=Math.round(Math.random()*26);
     if(i%9 == 0 &&  i < 89)
     a=ax;
     table+="<td class=\"num\">"+i+"</td><td class=\"symbols\">"+alphaArray[a]+"</td>";
     if(j%10 == 0) table+="</tr><tr>"; j++;
  }
  table+="</table>";
  sym.innerHTML=table
  sh.innerHTML=""
}

function show() {
  sh.innerHTML=alphaArray[ax]
  sym.innerHTML="<center>Here's what you have in mind. <a href=\"javascript:viewtable()\"><b>Repeat!</b></a></center>";
}
//-->
</SCRIPT>
 

<P style="FONT-SIZE: 13px">
<TABLE cellSpacing=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top bgcolor="#FFFFFF">
      <CENTER>
<H2>Magic Square - A.Tanase</H2>
<H2>&nbsp;</H2>
      </CENTER>
<DD> 1.&nbsp;Think of&nbsp;any&nbsp;two-digit number.<br>
        2.&nbsp;Subtract&nbsp;from it&nbsp;make up&nbsp;its&nbsp;numbers (for example, out of&nbsp;54&nbsp;we must subtract&nbsp;5 and 4, you

get&nbsp;45).<br>
3.&nbsp;Find&nbsp;the number&nbsp;in the table&nbsp;and a symbol&nbsp;to which it corresponds.<br>
4.&nbsp;Imagine&nbsp;yourself&nbsp;mentally&nbsp;that character.<br>
5.&nbsp;Click on the&nbsp;square.
<TABLE style="CURSOR: hand" onclick=show() cellSpacing=10 align=center
      border=0>
        <TBODY>
        <TR>
          <TD class=viewsymbol id=sh
      align=middle>&nbsp;</TD></TR></TBODY></TABLE></TD></TR>
  <TR>
<TD height=300 vAlign=top bgcolor="#F0F0F0" id=sym></TD></TR></TBODY></TABLE>
<SCRIPT language=javascript type=text/javascript>
<!--//
  viewtable();
//-->
</SCRIPT>

Înapoi la “Scripturi”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator