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

📄 05c.htm

📁 JAVASCROPT网页特效全站
💻 HTM
字号:
<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="05.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="05c.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"> 
              <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="2" onFocus="this.select()" onMouseOver="this.focus()" cols="50" style="BACKGROUND-COLOR: #009900;" wrap="VIRTUAL" class="pt9" rows="7">&lt;script language=&quot;JavaScript&quot;&gt;
&lt;!-- Begin
var expDays = 30;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function Who(info){
var VisitorName = GetCookie('VisitorName')
if (VisitorName == null) {
VisitorName = prompt(&quot;您的尊姓大名:&quot;);
SetCookie ('VisitorName', VisitorName, exp);
}
return VisitorName;
}
function When(info){
var rightNow = new Date()
var WWHTime = 0;
WWHTime = GetCookie('WWhenH')
WWHTime = WWHTime * 1
var lastHereFormatting = new Date(WWHTime);
var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate()
var lastHereInDateFormat = &quot;&quot; + lastHereFormatting;
var dayOfWeek = lastHereInDateFormat.substring(0,3)
var dateMonth = lastHereInDateFormat.substring(4,11)
var timeOfDay = lastHereInDateFormat.substring(11,16)
var year = lastHereInDateFormat.substring(23,25)
var WWHText = dayOfWeek + &quot;, &quot; + dateMonth + &quot; at &quot; + timeOfDay
SetCookie (&quot;WWhenH&quot;, rightNow.getTime(), exp)
return WWHText
}
function Count(info){
var WWHCount = GetCookie('WWHCount')
if (WWHCount == null) {
WWHCount = 0;
}
else{
WWHCount++;
}
SetCookie ('WWHCount', WWHCount, exp);
return WWHCount;
}
function set(){
VisitorName = prompt(&quot;Who are you?&quot;);
SetCookie ('VisitorName', VisitorName, exp);
SetCookie ('WWHCount', 0, exp);
SetCookie ('WWhenH', 0, exp);
}
function getCookieVal (offset) {  
var endstr = document.cookie.indexOf (&quot;;&quot;, offset);  
if (endstr == -1)    
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {  
var arg = name + &quot;=&quot;;  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i &lt; clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(&quot; &quot;, i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc &gt; 2) ? argv[2] : null;  
var path = (argc &gt; 3) ? argv[3] : null;  
var domain = (argc &gt; 4) ? argv[4] : null;  
var secure = (argc &gt; 5) ? argv[5] : false;  
document.cookie = name + &quot;=&quot; + escape (value) + 
((expires == null) ? &quot;&quot; : (&quot;; expires=&quot; + expires.toGMTString())) + 
((path == null) ? &quot;&quot; : (&quot;; path=&quot; + path)) +  
((domain == null) ? &quot;&quot; : (&quot;; domain=&quot; + domain)) +    
((secure == true) ? &quot;; secure&quot; : &quot;&quot;);
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + &quot;=&quot; + cval + &quot;; expires=&quot; + exp.toGMTString();
}
//  End --&gt;
&lt;/script&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;script language=&quot;JavaScript&quot;&gt;
if (Count()==0)
{
document.write(&quot;您好!&quot; + Who() + &quot;. 您首次来这儿,请多提宝贵意见.&quot;);
}
else
{
document.write(&quot;您好!&quot; + Who() + &quot;. 您已来这儿 &quot; + Count() + &quot;次了,最后一次在 &quot; + When() +&quot;.&quot;);
}
&lt;/script&gt;</textarea>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td height="20" class="white" bgcolor="#009900">当前位置:<a href="../../index.htm">首 
              页</a>→<a href="../index.htm">JavaScript</a>→<a href="index.htm#5">信息检测</a>→记录来宾姓名</td>
          </tr>
        </table>
        <br>
      </td>
      <td bgcolor="#009900" width="18"></td>
    </tr>
    <tr bgcolor="#009900"> 
      <td></td>
      <td align="center" height="35"> <font color="#FFFFFF">··无忧网络 设计发布··</font> 
      </td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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