《%
'仿 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';"
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



