网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP技巧
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.转换html代码子程序.
.关于页面缓存清除的方法小结.
.remote script文档(转载自微软)(.
.ASP函数库.
.分栏显示记录集的表格演示,并实.
.ASP与存储过程实践(实例) .
.ASP接收Ajax 在POST方式下发送的.
.在ASP中通过oo4o连接Oracle数据库.
.VBSctipt 5.0中的新特性.
.用ASP打开远端MDB文件的方法.
.服务器获得客户端时间的方法.
.ASP处理XSLT转换XML的实现.
.复杂表单的动态生成与动态验证.
.浅谈session_onend的调试.
.域名登记查询(whois)很复杂吗--方.
.6行代码实现无组件上传.
.如何从ACCESS数据库中读取图形(续.
.针对select写了一个通用的option.
.怎样使用ASP实现Ping.
.构建你的网站新闻自动发布系统之.

asp模仿 Lotus Notes 的界面程序

发表日期:2005-3-21


<%
'仿 Lotus Notes 的界面程序
'作者:塞北的雪
'创作日期: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'表示鼠标已经按下,拖动有

效;'no'表示鼠标已经泰起来了,再移动鼠标已经没有作用了
    
     var FI='yes';     //移动鼠标选中的时候用于控制,'yes'可以处理当前单元格,'no'

则不能处理
                       //默认为'yes',当我们进入某个单元格区域,则处理他,然后改为

'no',则不再
                       //对该单元格处理,当离开单元格时又改为'yes',又可以处理下一

个进入的单元格
     
     //执行数据删除 
     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 + "',")}
              //此处生成关键字串,由于是字符型,故在每个关键字的两侧加了单引号,
              //然后用逗号连接,如果是数字型,则不用单引号。
          }
       }
       if(pKey!="")
       {
          pKey=pKey.substring(0,pKey.length-1);
          if(confirm("确定要删除选定的信息吗?"))
          {
              document.getElementById("delPkey").value=pKey;
              document.getElementById("delForm").submit();
          }
       }
     }
    
     //执行数据修改,无论选中多少,但只对第一个进行修改
     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>
<%
'连接数据库
 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

'执行删除
if request("delPkey")<>"" then
   Response.Write "del:" & request("delPkey")
   Response.Redirect Request.ServerVariables("Path_info")
    '此处代码属于多余,但是可以避免刷新提示。根据需要,可以自由设计程序
end if

'读取数据
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>

上一篇:WAP版的手机号码所在地查询 人气:13196
下一篇:ORACLE920与ASP的连接问题的解决办法 人气:11992
浏览全部asp的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐