⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 02c.htm

📁 javascript94个网页特效下载
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<title>围格子</title>
<meta http-equiv="目录类型" content="文本/html; 字符集=gb2312">
<style type="text/css">
<!--
a{font-style:normal;text-decoration:none;color:white}
a:hover {BACKGROUND:red;font-style:normal;text-decoration:none;color:yellow}
a:active {font-style:normal;text-decoration:none;color:yellow;}
.white {  color: #FFFFFF}
table {  font-size: 9pt}
-->
</style>
<link rel="stylesheet" href="style.css">
</head>

<body bgcolor="#009900" topmargin="0" leftmargin="0">
<form name="form">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr bgcolor="#009900"> 
      <td colspan="3" height="18">&nbsp; </td>
    </tr>
    <tr> 
      <td bgcolor="#009900" width="18"></td>
      <td align="center" bgcolor="#FFFFFF" valign="top"> <br>
        <table width="56%" border="0" cellspacing="0" cellpadding="0" height="355">
          <tr> 
            <td rowspan="2" width="16" valign="top"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" class="white" style="FONT-SIZE: 11pt;">
                <tr bgcolor="#336699" bordercolor="#336699"> 
                  <td style="BORDER-RIGHT: double; BORDER-TOP: double;  BORDER-LEFT: double; BORDER-BOTTOM: double;" height="70"><strong><a href="02.htm">演<br>
                    <br>
                    示</a></strong></td>
                </tr>
                <tr bordercolor="#009900" bgcolor="#009900"> 
                  <td style="BORDER-RIGHT: double; BORDER-TOP: double; BORDER-LEFT: double; BORDER-BOTTOM: double" height="70"><strong><a href="02c.htm">源<br>
                    代<br>
                    码</a></strong></td>
                </tr>
              </table>
            </td>
            <td rowspan="2" width="8" bgcolor="#009900">&nbsp;</td>
            <td align="center" style="BORDER-RIGHT: double; BORDER-TOP: double; FONT-SIZE: 12pt; BORDER-LEFT: double; BORDER-BOTTOM: double" bordercolor="#009900" valign="top"> 
              <b> </b><br>
              <b>围格子</b> 
              <hr width="92%" size="1" align="center">
              <table  cellspacing="0" cellpadding="0" width="81%">
                <tr> 
                  <td colspan="2" height="25">注释:放在&lt;head&gt;与&lt;/head&gt;之间</td>
                </tr>
                <tr> 
                  <td colspan="2"> 
                    <p> 
                      <textarea name="head" onFocus="this.select()" onMouseOver="this.focus()" cols="50" style="BACKGROUND-COLOR: #009900;" wrap="VIRTUAL" class="pt9" rows="7">&lt;script&gt;
function ShowMenu(bMenu) {
document.all.idFinder.style.display = (bMenu) ? &quot;none&quot; : &quot;block&quot; 
document.all.idMenu.style.display = (bMenu) ? &quot;block&quot; : &quot;none&quot;
idML.className = (bMenu) ? &quot;cOn&quot; : &quot;cOff&quot;
idRL.className = (bMenu) ? &quot;cOff&quot; : &quot;cOn&quot;
return false
}
&lt;/script&gt;
&lt;script&gt;
&lt;!--
function addList(url,desc) {
if ((navigator.appName==&quot;Netscape&quot;) || (parseInt(navigator.appVersion)&gt;=4)) {
var w=window.open(&quot;&quot;,&quot;_IDHTML_LIST_&quot;,&quot;top=0,left=0,width=475,height=150,history=no,menubar=no,status=no,resizable=no&quot;)
var d=w.document
if (!w._init) {
d.open()
d.write(&quot;&lt;TITLE&gt;Loading...&lt;/TITLE&gt;&lt;EM&gt;Loading...&lt;/EM&gt;&quot;)
d.close()
d.location.replace(&quot;/assist/listing.asp?url=&quot;+escape(url)+&quot;&amp;desc=&quot;+escape(desc))  
w.opener=self    
window.status=&quot;Personal Assistant (Adding): &quot; + desc
} else {
window.status=w.addOption(url,desc)    
w.focus()
}
}
else
alert(&quot;Your browser does not support the personal assistant.&quot;)
return false
}
// --&gt;
&lt;/script&gt;
&lt;style&gt;
&lt;!--
A.cOn {text-decoration:none;font-weight:bolder}
#article {font: 12pt Verdana, geneva, arial, sans-serif;  background: white; color: black; padding: 10pt 15pt 0 5pt}
#article P.start {text-indent: 0pt}
#article P {margin-top:0pt;font-size:10pt;text-indent:12pt}
#article #author {margin-bottom:5pt;text-indent:0pt;font-style: italic}
#pageList P {padding-top:10pt}
#article H3 {font-weight:bold}
#article DL, UL, OL {font-size: 10pt}
--&gt;
&lt;/style&gt;
&lt;style&gt;
#board {font-family: arial}
.dot {position: absolute; width: 5px; height: 5px; font-size: 0pt; background: black}
#line {position: absolute; font-size: 0pt; height: 5px}
.p1 {position: absolute; font-size: 0pt;background: navy}
.p2 {position: absolute; font-size: 0pt;  background: red}
.p1B {position: absolute; font-size: 8pt; color: navy;text-align: center; font-weight: bold}
.p2B {position: absolute; font-size: 8pt; color: red; text-align: center; font-weight: bold}
&lt;/style&gt;</textarea>
                    
                  </td>
                </tr>
                <tr> 
                  <td height="25" colspan="2">注释:放在&lt;body&gt;与&lt;/body&gt;之间</td>
                </tr>
                <tr> 
                  <td colspan="2"> 
                    <textarea name="Code" onFocus="this.select()" onMouseOver="this.focus()" cols="50" wrap="VIRTUAL" style="BACKGROUND-COLOR: #009900;" class="pt9" rows="7">&lt;table width=&quot;90%&quot; border=&quot;1&quot;&gt;
              &lt;tr&gt; 
                &lt;td&gt;
                  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
                    &lt;tr&gt; 
                      &lt;td width=&quot;44%&quot; height=&quot;11&quot; align=&quot;center&quot;&gt;&lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;红方得分:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
                      &lt;td id=&quot;red&quot; height=&quot;11&quot; width=&quot;6%&quot;&gt;0&lt;/td&gt;
                      &lt;td width=&quot;44%&quot; height=&quot;11&quot; align=&quot;center&quot;&gt;&lt;font color=&quot;#0000CC&quot;&gt;&lt;b&gt;&lt;font color=&quot;#003399&quot;&gt;蓝方得分:&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
                      &lt;td id=&quot;navy&quot; height=&quot;11&quot; width=&quot;6%&quot;&gt;0&lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/table&gt;
                &lt;/td&gt;
                &lt;td&gt;
                  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
                    &lt;tr&gt; 
                      &lt;td width=&quot;35%&quot; align=&quot;right&quot;&gt;游戏大小:&lt;/td&gt;
                      &lt;td width=&quot;15%&quot;&gt; 
                        &lt;input type=&quot;Text&quot; value=&quot;5&quot; id=&quot;setSize&quot; size=&quot;2&quot; name=&quot;Text2&quot;&gt;
                      &lt;/td&gt;
                      &lt;td align=&quot;center&quot; width=&quot;50%&quot;&gt; 
                        &lt;input type=&quot;button&quot; onClick=&quot;createGame()&quot;
          value=&quot;重新开始&quot; name=&quot;button2&quot;&gt;
                      &lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/table&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt; 
                &lt;td colspan=&quot;2&quot;&gt;
                  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
                    &lt;tr align=&quot;center&quot;&gt; 
                      &lt;td height=&quot;30&quot;&gt; 
                        &lt;p class=&quot;start&quot; id=&quot;message&quot;&gt;蓝方先走!!!&lt;/p&gt;
                      &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr align=&quot;center&quot;&gt; 
                      &lt;td&gt; 
                        &lt;script&gt;
  /* DHTML Dots is copyright 1998 insideDHTML.com, LLC. All rights reserved.
     DHTML Dots cannot be reproduced in any manner without prior consent from insideDHTML.com */

  var scale= 25
  var size = 5

  var totalSize = ((size+1)*scale) + 6
  var cache = new Object()
  var move=0,point=0
  var player = true

  function initCache() {
    cache.x = 0
    cache.y = 0
    cache.red = 0
    cache.navy = 0
    move=0,point=0    
  }

  function updateScore() {
    document.all.red.innerText = cache.red
    document.all.navy.innerText = cache.navy
    if ((cache.red+cache.navy)==((size-1)*(size-1))) {
      board.onclick = null
      document.all.message.innerText = &quot;游戏结束!&quot;
    }
     
  }

  function fillPos(x,y) {
    document.all.board.insertAdjacentHTML(&quot;beforeEnd&quot;,&quot;&lt;DIV class=&quot; + (player ? &quot;p1B&quot; : &quot;p2B&quot;) + &quot; ID=\&quot;point&quot;+point+&quot;\&quot;&gt;&quot; + (player ? &quot;N&quot; : &quot;R&quot;) + &quot;&lt;/DIV&gt;&quot;)
    var el = document.all[&quot;point&quot;+point].style
    el.pixelTop = (y*scale)+5
    el.pixelLeft = (x*scale)+5
    el.pixelWidth = scale - 5
    el.pixelHeight = scale - 5

  }

  function checkBoard(x,y,dir, player) {
    var piece=0
    if (&quot;vertical&quot;==dir) {
      if ((x==size) || (x&gt;1)) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -