国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

asp模仿 Lotus Notes 的界面程序

2019-11-18 19:23:32
字體:
來源:轉載
供稿:網(wǎng)友

<%
'仿 Lotus Notes 的界面程序
'作者:塞北的雪
'創(chuàng)作日期:2002年3月
'修改日期:2005年3月
'為了安全和共享的方便,將其中asp程序的標記改成中文字符,使用時可以批量替換回
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.tHeader{font-weight:bold;background-color: #D0D0D0; color: #000000; border-left:

1 solid #FFFFFF; border-right: 1 solid #000000; border-top: 1 solid #FFFFFF;

border-bottom: 1 solid #000000}
.tHeaderPush{font-weight:bold;background-color: #D0D0D0; color: #000000; border: 1

solid #707070;}
</style>
<title>模仿Lotus Notes特效</title>
<script language=javascript>
     var yesH="√";    //選中后顯示的標志
     var noH='  ';     //未選中時的某人顯示
     var IfPush='no';  //移動鼠標選中的時候用于控制,'yes'表示鼠標已經(jīng)按下,拖動有

效;'no'表示鼠標已經(jīng)泰起來了,再移動鼠標已經(jīng)沒有作用了
    
     var FI='yes';     //移動鼠標選中的時候用于控制,'yes'可以處理當前單元格,'no'

則不能處理
                       //默認為'yes',當我們進入某個單元格區(qū)域,則處理他,然后改為

'no',則不再
                       //對該單元格處理,當離開單元格時又改為'yes',又可以處理下一

個進入的單元格
     
     //執(zhí)行數(shù)據(jù)刪除 
     function delInfo(iCount)
     {
       var pKey=new String();
       if(iCount>0)
       {
          for(var i=1;i<=iCount;i++)
          {
            if (document.getElementById("a" + i).innerText==yesH)
              {pKey += ("'" + document.getElementById("pKey" + i).value + "',")}
              //此處生成關鍵字串,由于是字符型,故在每個關鍵字的兩側加了單引號,
              //然后用逗號連接,如果是數(shù)字型,則不用單引號。
          }
       }
       if(pKey!="")
       {
          pKey=pKey.substring(0,pKey.length-1);
          if(confirm("確定要刪除選定的信息嗎?"))
          {
              document.getElementById("delPkey").value=pKey;
              document.getElementById("delForm").submit();
          }
       }
     }
    
     //執(zhí)行數(shù)據(jù)修改,無論選中多少,但只對第一個進行修改
     function editInfo(iCount)
     {
       var pKey=new String();
       if(iCount>0)
       {
          for(var i=1;i<=iCount;i++)
          {
            if (document.getElementById("a" + i).innerText==yesH)
              {pKey += document.getElementById("pKey" + i).value;
               break;}
          }
       }
       if(pKey!="")
       {
            window.open("editinfo.asp?unid=" + pKey,"_blank");
            //此處進入邊界界面,對選中信息進行編輯。editinto.asp代碼沒有編寫。
       }
     }
       
     function md()
     {IfPush='yes';}
    
     function mu()
     {IfPush='no';}       
    
     //拖拉選取
     function Wr(whoTd)
     {
  if (IfPush=='yes')
  {
      if (FI=='yes')
      {   FI='no';
    if (whoTd.innerText!=noH)
       {whoTd.innerText=noH;}
    else
       {whoTd.innerText=yesH;}
   }
   }   
     }
    
     //單擊選取
     function WRone(whoTd)
     {
      if (whoTd.innerText!=noH)
         {whoTd.innerText=noH;}
      else
         {whoTd.innerText=yesH;}
     }
</script>

</head>
<%
'連接數(shù)據(jù)庫
 Set db=Server.CreateObject("ADODB.Connection")
 dim DBPath
 DBPath = Server.MapPath("crc/configinfo/dispatch.mdb")
 dim mmm
 mmm="driver={Microsoft access Driver (*.mdb)};dbq="& DBPath
 db.Open mmm

'執(zhí)行刪除
if request("delPkey")<>"" then
   Response.Write "del:" & request("delPkey")
   Response.Redirect Request.ServerVariables("Path_info")
    '此處代碼屬于多余,但是可以避免刷新提示。根據(jù)需要,可以自由設計程序
end if

'讀取數(shù)據(jù)
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open "select * from notes",db,3

%>
<body   onmousedown="md();" onmouseup="mu();"  oncontextmenu="return false"

ondragstart="return false" onselectstart="return false">
<br><br><br><div align=center>
<table border="1" rules=none frame=hsides cellspacing=0 cellpadding=0 width="90%">
  <tr>
    <td width="4%" bgcolor="#FFFFFF" style="cursor:hand" >
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
       <tr><td class="tHeader"

onmousedown="Javascript:this.className='tHeaderPush';"

onmouseup="javascript:this.className='tHeader';" 

onmouSEOut="javascript:this.className='tHeader';" >&nbsp;</td>
           <td width="62%" onmousedown="javascript:this.className='tHeaderPush';"

onmouseup="javascript:this.className='tHeader';" 

onmouseout="javascript:this.className='tHeader';" class="tHeader"  align="center"

><font size="2">標題</font></td>
           <td width="34%" onmousedown="javascript:this.className='tHeaderPush';"

onmouseup="javascript:this.className='tHeader';" 

onmouseout="javascript:this.className='tHeader';" class="tHeader"  align="center"

><font size="2">日期</font></td>

       </tr>
       <%if rs.RecordCount>0 then
             BGC="#DAF0FE"
    Whi=0
    j=0
    rs.MoveFirst
    do while not rs.EOF
       j=j+1%>
    <tr>
        <td align=center id="a<%=j%>"

onmouseover="Wr(this);" onmouseout="javascrpt:FI='yes';"

onmousedown="WRone(this);" bgcolor="#FFFFE8">
          <p align="center">&nbsp;&nbsp;</p>
        </td>
        <input type="hidden" id="pKey<%=j%>" value="

<%=rs("unid")%>">
     <td   id="b<%=j%>"

bgcolor="<%=BGC%>"><font size="2">&nbsp;<%=rs("subject")%></font></td>
     <td   id="c<%=j%>" bgcolor="<%=BGC%>"

align=center><font size="2"><%=rs("disptime")%></font></td>
       <%
       if Whi=0 then
          BGC="#faaded"
          whi=1
       else
          whi=0
          BGC="#DAF0FE"
       end if
     %>
    </tr>
   <%rs.MoveNext
   loop
        end if%>
      </table>
    </td>
  </tr>
</table>
<br>
<%if rs.RecordCount>0 then%>
<input type=button name="editinfo" value="修改…"

onclick="editInfo('<%=rs.RecordCount%>');">
<input type=button name="delinfo" value="刪除…"

onclick="delInfo('<%=rs.RecordCount%>');">
<%end if%>
</div>
<div style='visibility:hidden;'>
<form method="post" id="delForm" action="<%=Request.ServerVariables("Path_Info")%

>">
   <input type="hidden" id="delPkey" name="delPkey" value="">
</form>
</div>
</body>
</html>


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 阳原县| 长丰县| 福泉市| 康乐县| 通辽市| 长泰县| 津南区| 儋州市| 灵寿县| 沂源县| 巢湖市| 泰州市| 横峰县| 株洲县| 仪陇县| 武隆县| 泉州市| 承德县| 洛宁县| 屯门区| 竹北市| 龙海市| 荥阳市| 朝阳区| 浠水县| 吴堡县| 台安县| 武宣县| 乌鲁木齐县| 论坛| 六安市| 寿光市| 桃园县| 丹寨县| 昌邑市| 独山县| 鄂托克前旗| 福海县| 安平县| 庆城县| 红安县|