Picture Puzzle Memory Test game, Web +js version _ Game Entertainment

Source: Internet
Author: User
Tags eval visibility

Memory test game, webpage +js Edition, rule: The graph is divided into 15 pieces.
Each time you give a random piece, locate it in the question area and click the location. One point for each area, 15 points to win, each game only 15 times.

<ptml> <pead> <title> Memory Test </title> <style>. 20pt{font-size:20pt;color: #de3076} </st yle> <script language= "JavaScript" > <!--N = (navigator.appName.indexOf ("Netscape")!=-1); M = (navigator.appName.indexOf ("Microsoft")!=-1); Vis = new Array (); Vis[0] = (M)? "Hidden": "Hide"; VIS[1] = (M)? "Visible": "Show"; function Getdiv (divid,divy,divx,divw,divh,bcol,visb,zind) {bkcol= (bcol!= "")? ( (N)? " Bgcolor= "+bcol:"; background: "+bcol):"; Divtyp = (M)? "<div": "<layer" if (M) {styl= "id=" +divid+ "+divy+"; Left: "+divx+"; width: "+divw+"; Height: "+divh+bkcol+"; Visibility: "+vis[visb]+"; Z-index: "+zind+" ">"; } if (N) {styl= "id=" +divid+ "top=" +divy+ "left=" +divx+ "width=" +divw+ "height=" +divh+bkcol+ "visibility=" +Vis[visb]+ "Z -index= "+zind+" > "; } document.writeln (Divtyp+styl); function Enddiv () {(M) Document.writeln ("</DIV>"): Document.writeln ("</LAYER>"); Corr = new Array (); Gnum = 0; Score = 0; Ind = 0; for (rows = 0; rows < 3. rows++) {for (cols = 0; cols < 5; cols++) {ind++; Corr[ind] = 0; Eval ("Getdiv" (' d "+ind+" "," +rows*100+ "," +cols*100+ ", 100,100, ', 1,0)"); document.write (""); Enddiv (); Eval ("Getdiv" (' Dvtop "+ind+", "+rows*100+", "+cols*100+", 100,100, ', 0, 1) "); document.write (""); Enddiv (); } getdiv (' Control1 ', 300,0,400,100, ' Silver ', 1,0); document.write ("<center><br> take a closer look at this picture before starting to test the .</center>"); Enddiv (); Getdiv (' Control2 ', 300,0,400,100, ' Silver ', 0, 1); document.write ("<center><br> This picture corresponds to which position in the above?=><br><br></center>"); Enddiv (); Getdiv (' Testpix ', 300,400,100,100, ', 1, 1); document.write (' s) {alert (' It ' over! Score = "+score); for (x = 1; x < + + +) {Corr[x] = 0;} if (score =) alert ("and you win!"); Gnum = 0; Score = 0; Window.close (); } settimeout (' Starttest () ', 1000); --> </script> </pead> <body> <div > </div> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.