ibility:hidden">
<table>
<tr align="center">
<td></td>
<td><input id="que" type=button value="查询" onclick="query();"></td>
<td><input id="mod" type=button value="修改" onclick="mod();"></td>
<td><input id="del" type=button value="删除" onclick="del();"></td>
</tr>
</table>
</div>
</center>
<div id="findPanel">
<div id="findPanelTitle">可拖动</div>
<div id="findPanelContent">
<input type="text" size="20" value="a" id="key" onkeydown="javascript:ChckSubmit(event);">
<input type="button" value="查找" onclick="javascript:OnKeySubmit();">
</div>
</div>
<script language="javascript">
<!--
var findPanel = document.getElementById("findPanel");
var findPanelTitle = document.getElementById("findPanelTitle");
var findPanelContent = document.getElementById("findPanelContent");
var findPanel_orgnX = 50;
var findPanel_orgnY = 50;
//设置物件位置
findPanel.style.pixelLeft = document.body.scrollLeft + findPanel_orgnX;
findPanel.style.pixelTop = document.body.scrollTop + findPanel_orgnY;
//================================================================================
var foundCnt = 0; //已经找到了的结果的数量
//查找入口函数
function Find(key)
{
if (key == "")
{
return;
}
if (document.all)
{
IEFind(key);
}
else
{
NSFind(key);
}
}
//浏览器为 IE 系列
function IEFind(key)
{
var rng = document.body.createTextRange();
var found = false;
for (var i=0; i<=foundCnt && (found=rng.findText(key)); i++)
{
rng.moveStart("character", 1); //找到,后移一位以查找下一个
}
if (found)
{
rng.moveStart("character", -1);
rng.findText(key);
rng.select();
rng.scrollIntoView();
foundCnt++;
}
else
{
if (foundCnt > 0)
{
//已经查找一遍,找到有符合条件的结果,重新开始查找
foundCnt = 0;
IEFind(key);
}
else
{
//已经查找一遍,没有找到符合条件的结果
alert("文档搜索完毕。");
}
}
}
//浏览器为 NS 系列
function NSFind(key)
{
if (window.find(key))
{
foundCnt++;
}
else
{
var found = false;
while (window.find(key, false, true))
{
found = true;
}
if (found)
{
//已经查找一遍,找到有符合条件的结果,重新查找也已经开始
foundCnt = 1;
}
else
{
//已经查找一遍,没有找到符合条件的结果
alert("文档搜索完毕。");
}
}
}
function OnKeySubmit()
{
var key = document.getElementById("key");
Find(key.value);
}
function ChckSubmit(e)
{
if (e.keyCode == 13)
{
OnKeySubmit();
}
}
//================================================================================
function RePosFindPanel()
{
findPanel.style.pixelLeft = document.body.scrollLeft + findPanel_orgnX;
findPanel.style.pixelTop = document.body.scrollTop + findPanel_orgnY;
}
document.body.onscroll = RePosFindPanel;
document.body.onresize = RePosFindPanel;
//================================================================================
//拖拽过程中相关变量
var draging = false; //是否处于拖拽中
var offsetX = 0; //X方向左右偏移量
var offsetY = 0; //Y方向上下偏移量
//准备拖拽
function BeforeDrag()
{
if (even