提示无对象错误急死我了! 点击Click显示隐藏层,在“移动栏”的位置点击,提示错误。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该是这句的问题:tempx=parseInt(crossobj.style.left); 把你的js脚本拿到html加载的最后就可以了 页面没加载你就取控件就取不到了 <style> #data { position: absolute; width ="500" height="300" padding : 5px; z-index: 100; cursor: hand; } </style> 把上边这一串里的样式改到<div id="data" style="left:50;top:50;display:none"> 一起就对了,样式遭重叠了,取crossobj.style.left的时候找不到left 改后还是提示错误<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>放大镜</title></head><body><script language="JavaScript"> crossobj=document.getElementById("data"); document.onmousedown=initializedrag; document.onmouseup=new Function("dragapproved=false"); function initializedrag(){ if(event.srcElement.id=="data"){ offsetx=event.clientX; offsety=event.clientY; tempx=parseInt(crossobj.style.left); tempy=parseInt(crossobj.style.top); dragapproved=true; document.onmousemove=drag_drop; } } function drag_drop(){ if(dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx; crossobj.style.top=tempy+event.clientY-offsety; return false; } } function show() { document.getElementById("main").style.display="none"; document.getElementById("main").style.visibility="hidden"; document.getElementById("data").style.display="block"; document.getElementById("data").style.visibility="visible"; } function hide() { document.getElementById("main").style.display="block"; document.getElementById("data").style.visibility="hidden"; } function goNextPage() { myTable1.nextPage(); } function goPrePage() { myTable1.previousPage(); } function goFirstPage() { myTable1.firstPage(); } function goLastPage() { myTable1.lastPage(); }</script><div id="main" style="visiblity: visible"><input type="text" value="" /> <input type="button" value="click" onclick="show()" /></div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">移动栏<OBJECT ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" BORDER="0" WIDTH="0" HEIGHT="0"> <PARAM NAME="DataURL" value="data2.txt"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT><table id="outer_table" border=3 bordercolor="yellow"> <tr> <td> <table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10" bordercolor="blue"> <thead> <tr> <td>公司名称</td> <td>联系人姓名</td> </tr> </thead> <tbody> <tr height=25px valign="middle"> <td width="70"> <input id="input" type="radio" name="radio" /> </td> <td width="110"> <div DATAFLD="公司名称"> </td> <td width="70"> <div DATAFLD="联系人姓名"> </td> </tr> </tbody> </table> <table align="center" border=2> <tr> <td align="center"> <input id="first" type="button" value=" 第一页 " onclick="goFirstPage()"> <input id="next" type="button" value=" 下一页 " onclick="goNextPage()"> <input id="previous" type="button" value=" 上一页 " onclick="goPrePage()"> <input id="last" type="button" value=" 最后一页 " onclick="goLastPage()"> </td> </tr> <tr> <td align="center"> <input type="button" value=" 确认 " onclick="hide()" /> <input type="button" value=" 取消 " onclick="hide()" /> </td> </tr> </table> </td> </tr></table> </div></body></html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>放大镜</title></head><body><script language="JavaScript"> /*var list = {}; var input=document.getElementsById('input'); input.onclick = function(){ if(this.checked && list[this.value]){ delete list[this.value]; return; } list[this.value] = [this.cells[1].innerHTML, this.cells[2].innerHTML];}*/ crossobj=document.getElementById("data"); document.onmousedown=initializedrag; document.onmouseup=new Function("dragapproved=false"); function initializedrag(){ if(event.srcElement.id=="data"){ offsetx=event.clientX; offsety=event.clientY; tempx=parseInt(crossobj.style.left); tempy=parseInt(crossobj.style.top); dragapproved=true; document.onmousemove=drag_drop; } } function drag_drop(){ if(dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx; crossobj.style.top=tempy+event.clientY-offsety; return false; } } function show() { document.getElementById("main").style.display="none"; document.getElementById("main").style.visibility="hidden"; document.getElementById("data").style.display="block"; document.getElementById("data").style.visibility="visible"; } function hide() { document.getElementById("main").style.display="block"; document.getElementById("data").style.visibility="hidden"; } function goNextPage() { myTable1.nextPage(); } function goPrePage() { myTable1.previousPage(); } function goFirstPage() { myTable1.firstPage(); } function goLastPage() { myTable1.lastPage(); }</script><div id="main" style="visiblity: visible"><input type="text" value="" /> <input type="button" value="click" onclick="show()" /></div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">移动栏<OBJECT ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" BORDER="0" WIDTH="0" HEIGHT="0"> <PARAM NAME="DataURL" value="data2.txt"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT><table id="outer_table" border=3 bordercolor="yellow"> <tr> <td> <table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10" bordercolor="blue"> <thead> <tr> <td>公司名称</td> <td>联系人姓名</td> </tr> </thead> <tbody> <tr height=25px valign="middle"> <td width="70"> <input id="input" type="radio" name="radio" /> </td> <td width="110"> <div DATAFLD="公司名称"> </td> <td width="70"> <div DATAFLD="联系人姓名"> </td> </tr> </tbody> </table> <table align="center" border=2> <tr> <td align="center"> <input id="first" type="button" value=" 第一页 " onclick="goFirstPage()"> <input id="next" type="button" value=" 下一页 " onclick="goNextPage()"> <input id="previous" type="button" value=" 上一页 " onclick="goPrePage()"> <input id="last" type="button" value=" 最后一页 " onclick="goLastPage()"> </td> </tr> <tr> <td align="center"> <input type="button" value=" 确认 " onclick="hide()" /> <input type="button" value=" 取消 " onclick="hide()" /> </td> </tr> </table> </td> </tr></table> </div></body></html> 改后还是提示错误<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>放大镜</title></head><body><script language="JavaScript"> crossobj=document.getElementById("data"); document.onmousedown=initializedrag; document.onmouseup=new Function("dragapproved=false"); function initializedrag(){ if(event.srcElement.id=="data"){ offsetx=event.clientX; offsety=event.clientY; tempx=parseInt(crossobj.style.left); tempy=parseInt(crossobj.style.top); dragapproved=true; document.onmousemove=drag_drop; } } function drag_drop(){ if(dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx; crossobj.style.top=tempy+event.clientY-offsety; return false; } } function show() { document.getElementById("main").style.display="none"; document.getElementById("main").style.visibility="hidden"; document.getElementById("data").style.display="block"; document.getElementById("data").style.visibility="visible"; } function hide() { document.getElementById("main").style.display="block"; document.getElementById("data").style.visibility="hidden"; } function goNextPage() { myTable1.nextPage(); } function goPrePage() { myTable1.previousPage(); } function goFirstPage() { myTable1.firstPage(); } function goLastPage() { myTable1.lastPage(); }</script><div id="main" style="visiblity: visible"><input type="text" value="" /> <input type="button" value="click" onclick="show()" /></div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">移动栏<OBJECT ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" BORDER="0" WIDTH="0" HEIGHT="0"> <PARAM NAME="DataURL" value="data2.txt"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT><table id="outer_table" border=3 bordercolor="yellow"> <tr> <td> <table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10" bordercolor="blue"> <thead> <tr> <td>公司名称</td> <td>联系人姓名</td> </tr> </thead> <tbody> <tr height=25px valign="middle"> <td width="70"> <input id="input" type="radio" name="radio" /> </td> <td width="110"> <div DATAFLD="公司名称"> </td> <td width="70"> <div DATAFLD="联系人姓名"> </td> </tr> </tbody> </table> <table align="center" border=2> <tr> <td align="center"> <input id="first" type="button" value=" 第一页 " onclick="goFirstPage()"> <input id="next" type="button" value=" 下一页 " onclick="goNextPage()"> <input id="previous" type="button" value=" 上一页 " onclick="goPrePage()"> <input id="last" type="button" value=" 最后一页 " onclick="goLastPage()"> </td> </tr> <tr> <td align="center"> <input type="button" value=" 确认 " onclick="hide()" /> <input type="button" value=" 取消 " onclick="hide()" /> </td> </tr> </table> </td> </tr></table> </div></body></html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>放大镜</title></head><body><script language="JavaScript"> /*var list = {}; var input=document.getElementsById('input'); input.onclick = function(){ if(this.checked && list[this.value]){ delete list[this.value]; return; } list[this.value] = [this.cells[1].innerHTML, this.cells[2].innerHTML];}*/ crossobj=document.getElementById("data"); document.onmousedown=initializedrag; document.onmouseup=new Function("dragapproved=false"); function initializedrag(){ if(event.srcElement.id=="data"){ offsetx=event.clientX; offsety=event.clientY; tempx=parseInt(crossobj.style.left); tempy=parseInt(crossobj.style.top); dragapproved=true; document.onmousemove=drag_drop; } } function drag_drop(){ if(dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx; crossobj.style.top=tempy+event.clientY-offsety; return false; } } function show() { document.getElementById("main").style.display="none"; document.getElementById("main").style.visibility="hidden"; document.getElementById("data").style.display="block"; document.getElementById("data").style.visibility="visible"; } function hide() { document.getElementById("main").style.display="block"; document.getElementById("data").style.visibility="hidden"; } function goNextPage() { myTable1.nextPage(); } function goPrePage() { myTable1.previousPage(); } function goFirstPage() { myTable1.firstPage(); } function goLastPage() { myTable1.lastPage(); }</script><div id="main" style="visiblity: visible"><input type="text" value="" /> <input type="button" value="click" onclick="show()" /></div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">移动栏<OBJECT ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" BORDER="0" WIDTH="0" HEIGHT="0"> <PARAM NAME="DataURL" value="data2.txt"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT><table id="outer_table" border=3 bordercolor="yellow"> <tr> <td> <table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10" bordercolor="blue"> <thead> <tr> <td>公司名称</td> <td>联系人姓名</td> </tr> </thead> <tbody> <tr height=25px valign="middle"> <td width="70"> <input id="input" type="radio" name="radio" /> </td> <td width="110"> <div DATAFLD="公司名称"> </td> <td width="70"> <div DATAFLD="联系人姓名"> </td> </tr> </tbody> </table> <table align="center" border=2> <tr> <td align="center"> <input id="first" type="button" value=" 第一页 " onclick="goFirstPage()"> <input id="next" type="button" value=" 下一页 " onclick="goNextPage()"> <input id="previous" type="button" value=" 上一页 " onclick="goPrePage()"> <input id="last" type="button" value=" 最后一页 " onclick="goLastPage()"> </td> </tr> <tr> <td align="center"> <input type="button" value=" 确认 " onclick="hide()" /> <input type="button" value=" 取消 " onclick="hide()" /> </td> </tr> </table> </td> </tr></table> </div></body></html> 改后还是提示错误<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>放大镜</title></head><body><script language="JavaScript"> crossobj=document.getElementById("data"); document.onmousedown=initializedrag; document.onmouseup=new Function("dragapproved=false"); function initializedrag(){ if(event.srcElement.id=="data"){ offsetx=event.clientX; offsety=event.clientY; tempx=parseInt(crossobj.style.left); tempy=parseInt(crossobj.style.top); dragapproved=true; document.onmousemove=drag_drop; } } function drag_drop(){ if(dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx; crossobj.style.top=tempy+event.clientY-offsety; return false; } } function show() { document.getElementById("main").style.display="none"; document.getElementById("main").style.visibility="hidden"; document.getElementById("data").style.display="block"; document.getElementById("data").style.visibility="visible"; } function hide() { document.getElementById("main").style.display="block"; document.getElementById("data").style.visibility="hidden"; } function goNextPage() { myTable1.nextPage(); } function goPrePage() { myTable1.previousPage(); } function goFirstPage() { myTable1.firstPage(); } function goLastPage() { myTable1.lastPage(); }</script><div id="main" style="visiblity: visible"><input type="text" value="" /> <input type="button" value="click" onclick="show()" /></div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">移动栏<OBJECT ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" BORDER="0" WIDTH="0" HEIGHT="0"> <PARAM NAME="DataURL" value="data2.txt"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT><table id="outer_table" border=3 bordercolor="yellow"> <tr> <td> <table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10" bordercolor="blue"> <thead> <tr> <td>公司名称</td> <td>联系人姓名</td> </tr> </thead> <tbody> <tr height=25px valign="middle"> <td width="70"> <input id="input" type="radio" name="radio" /> </td> <td width="110"> <div DATAFLD="公司名称"> </td> <td width="70"> <div DATAFLD="联系人姓名"> </td> </tr> </tbody> </table> <table align="center" border=2> <tr> <td align="center"> <input id="first" type="button" value=" 第一页 " onclick="goFirstPage()"> <input id="next" type="button" value=" 下一页 " onclick="goNextPage()"> <input id="previous" type="button" value=" 上一页 " onclick="goPrePage()"> <input id="last" type="button" value=" 最后一页 " onclick="goLastPage()"> </td> </tr> <tr> <td align="center"> <input type="button" value=" 确认 " onclick="hide()" /> <input type="button" value=" 取消 " onclick="hide()" /> </td> </tr> </table> </td> </tr></table> </div></body></html> 关于alert和confirm的区别 用javascript做网页和图片 求组合框核心代码 关于JavaScript的问题 帮帮忙 js中的replace函数的使用 请问怎样在网页上控制扫描仪呀? 怎样给按钮加上说明文字? 关于数字千分位的转化,"转过去容易转回来难"啊,孟兄帮忙来看看 关于调整<显示在线时间>字体大小的问题。 打开一个网页后自动链接到另外一个网页(原网页自动关闭),怎么来实现? reload和refresh的联系与区别 js加密解密的问题
#data {
position: absolute; width ="500" height="300" padding : 5px;
z-index: 100;
cursor: hand;
}
</style>
把上边这一串里的样式改到<div id="data" style="left:50;top:50;display:none"> 一起
就对了,样式遭重叠了,取crossobj.style.left的时候找不到left
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜</title>
</head>
<body><script language="JavaScript">
crossobj=document.getElementById("data");
document.onmousedown=initializedrag;
document.onmouseup=new Function("dragapproved=false");
function initializedrag(){
if(event.srcElement.id=="data"){
offsetx=event.clientX;
offsety=event.clientY;
tempx=parseInt(crossobj.style.left);
tempy=parseInt(crossobj.style.top);
dragapproved=true;
document.onmousemove=drag_drop;
}
}
function drag_drop(){
if(dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx;
crossobj.style.top=tempy+event.clientY-offsety;
return false;
}
}
function show()
{
document.getElementById("main").style.display="none";
document.getElementById("main").style.visibility="hidden";
document.getElementById("data").style.display="block";
document.getElementById("data").style.visibility="visible";
}
function hide()
{
document.getElementById("main").style.display="block";
document.getElementById("data").style.visibility="hidden";
} function goNextPage()
{
myTable1.nextPage();
}
function goPrePage()
{
myTable1.previousPage();
}
function goFirstPage()
{
myTable1.firstPage();
}
function goLastPage()
{
myTable1.lastPage();
}</script><div id="main" style="visiblity: visible">
<input type="text" value="" />
<input type="button" value="click" onclick="show()" />
</div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">
移动栏
<OBJECT
ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
BORDER="0" WIDTH="0" HEIGHT="0">
<PARAM NAME="DataURL" value="data2.txt">
<PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<table id="outer_table" border=3 bordercolor="yellow">
<tr>
<td>
<table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10"
bordercolor="blue">
<thead>
<tr>
<td>公司名称</td>
<td>联系人姓名</td>
</tr>
</thead>
<tbody>
<tr height=25px valign="middle">
<td width="70">
<input id="input" type="radio" name="radio" />
</td>
<td width="110">
<div DATAFLD="公司名称">
</td>
<td width="70">
<div DATAFLD="联系人姓名">
</td>
</tr>
</tbody>
</table>
<table align="center" border=2>
<tr>
<td align="center">
<input id="first" type="button" value=" 第一页 " onclick="goFirstPage()">
<input id="next" type="button" value=" 下一页 " onclick="goNextPage()">
<input id="previous" type="button" value=" 上一页 " onclick="goPrePage()">
<input id="last" type="button" value=" 最后一页 " onclick="goLastPage()">
</td>
</tr>
<tr>
<td align="center">
<input type="button" value=" 确认 " onclick="hide()" />
<input type="button" value=" 取消 " onclick="hide()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜</title>
</head>
<body><script language="JavaScript">
/*var list = {};
var input=document.getElementsById('input');
input.onclick = function(){
if(this.checked && list[this.value]){
delete list[this.value];
return;
}
list[this.value] = [this.cells[1].innerHTML, this.cells[2].innerHTML];
}*/
crossobj=document.getElementById("data");
document.onmousedown=initializedrag;
document.onmouseup=new Function("dragapproved=false");
function initializedrag(){
if(event.srcElement.id=="data"){
offsetx=event.clientX;
offsety=event.clientY;
tempx=parseInt(crossobj.style.left);
tempy=parseInt(crossobj.style.top);
dragapproved=true;
document.onmousemove=drag_drop;
}
}
function drag_drop(){
if(dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx;
crossobj.style.top=tempy+event.clientY-offsety;
return false;
}
}
function show()
{
document.getElementById("main").style.display="none";
document.getElementById("main").style.visibility="hidden";
document.getElementById("data").style.display="block";
document.getElementById("data").style.visibility="visible";
}
function hide()
{
document.getElementById("main").style.display="block";
document.getElementById("data").style.visibility="hidden";
} function goNextPage()
{
myTable1.nextPage();
}
function goPrePage()
{
myTable1.previousPage();
}
function goFirstPage()
{
myTable1.firstPage();
}
function goLastPage()
{
myTable1.lastPage();
}</script><div id="main" style="visiblity: visible">
<input type="text" value="" />
<input type="button" value="click" onclick="show()" />
</div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">
移动栏
<OBJECT
ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
BORDER="0" WIDTH="0" HEIGHT="0">
<PARAM NAME="DataURL" value="data2.txt">
<PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<table id="outer_table" border=3 bordercolor="yellow">
<tr>
<td>
<table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10"
bordercolor="blue">
<thead>
<tr>
<td>公司名称</td>
<td>联系人姓名</td>
</tr>
</thead>
<tbody>
<tr height=25px valign="middle">
<td width="70">
<input id="input" type="radio" name="radio" />
</td>
<td width="110">
<div DATAFLD="公司名称">
</td>
<td width="70">
<div DATAFLD="联系人姓名">
</td>
</tr>
</tbody>
</table>
<table align="center" border=2>
<tr>
<td align="center">
<input id="first" type="button" value=" 第一页 " onclick="goFirstPage()">
<input id="next" type="button" value=" 下一页 " onclick="goNextPage()">
<input id="previous" type="button" value=" 上一页 " onclick="goPrePage()">
<input id="last" type="button" value=" 最后一页 " onclick="goLastPage()">
</td>
</tr>
<tr>
<td align="center">
<input type="button" value=" 确认 " onclick="hide()" />
<input type="button" value=" 取消 " onclick="hide()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜</title>
</head>
<body><script language="JavaScript">
crossobj=document.getElementById("data");
document.onmousedown=initializedrag;
document.onmouseup=new Function("dragapproved=false");
function initializedrag(){
if(event.srcElement.id=="data"){
offsetx=event.clientX;
offsety=event.clientY;
tempx=parseInt(crossobj.style.left);
tempy=parseInt(crossobj.style.top);
dragapproved=true;
document.onmousemove=drag_drop;
}
}
function drag_drop(){
if(dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx;
crossobj.style.top=tempy+event.clientY-offsety;
return false;
}
}
function show()
{
document.getElementById("main").style.display="none";
document.getElementById("main").style.visibility="hidden";
document.getElementById("data").style.display="block";
document.getElementById("data").style.visibility="visible";
}
function hide()
{
document.getElementById("main").style.display="block";
document.getElementById("data").style.visibility="hidden";
} function goNextPage()
{
myTable1.nextPage();
}
function goPrePage()
{
myTable1.previousPage();
}
function goFirstPage()
{
myTable1.firstPage();
}
function goLastPage()
{
myTable1.lastPage();
}</script><div id="main" style="visiblity: visible">
<input type="text" value="" />
<input type="button" value="click" onclick="show()" />
</div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">
移动栏
<OBJECT
ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
BORDER="0" WIDTH="0" HEIGHT="0">
<PARAM NAME="DataURL" value="data2.txt">
<PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<table id="outer_table" border=3 bordercolor="yellow">
<tr>
<td>
<table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10"
bordercolor="blue">
<thead>
<tr>
<td>公司名称</td>
<td>联系人姓名</td>
</tr>
</thead>
<tbody>
<tr height=25px valign="middle">
<td width="70">
<input id="input" type="radio" name="radio" />
</td>
<td width="110">
<div DATAFLD="公司名称">
</td>
<td width="70">
<div DATAFLD="联系人姓名">
</td>
</tr>
</tbody>
</table>
<table align="center" border=2>
<tr>
<td align="center">
<input id="first" type="button" value=" 第一页 " onclick="goFirstPage()">
<input id="next" type="button" value=" 下一页 " onclick="goNextPage()">
<input id="previous" type="button" value=" 上一页 " onclick="goPrePage()">
<input id="last" type="button" value=" 最后一页 " onclick="goLastPage()">
</td>
</tr>
<tr>
<td align="center">
<input type="button" value=" 确认 " onclick="hide()" />
<input type="button" value=" 取消 " onclick="hide()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜</title>
</head>
<body><script language="JavaScript">
/*var list = {};
var input=document.getElementsById('input');
input.onclick = function(){
if(this.checked && list[this.value]){
delete list[this.value];
return;
}
list[this.value] = [this.cells[1].innerHTML, this.cells[2].innerHTML];
}*/
crossobj=document.getElementById("data");
document.onmousedown=initializedrag;
document.onmouseup=new Function("dragapproved=false");
function initializedrag(){
if(event.srcElement.id=="data"){
offsetx=event.clientX;
offsety=event.clientY;
tempx=parseInt(crossobj.style.left);
tempy=parseInt(crossobj.style.top);
dragapproved=true;
document.onmousemove=drag_drop;
}
}
function drag_drop(){
if(dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx;
crossobj.style.top=tempy+event.clientY-offsety;
return false;
}
}
function show()
{
document.getElementById("main").style.display="none";
document.getElementById("main").style.visibility="hidden";
document.getElementById("data").style.display="block";
document.getElementById("data").style.visibility="visible";
}
function hide()
{
document.getElementById("main").style.display="block";
document.getElementById("data").style.visibility="hidden";
} function goNextPage()
{
myTable1.nextPage();
}
function goPrePage()
{
myTable1.previousPage();
}
function goFirstPage()
{
myTable1.firstPage();
}
function goLastPage()
{
myTable1.lastPage();
}</script><div id="main" style="visiblity: visible">
<input type="text" value="" />
<input type="button" value="click" onclick="show()" />
</div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">
移动栏
<OBJECT
ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
BORDER="0" WIDTH="0" HEIGHT="0">
<PARAM NAME="DataURL" value="data2.txt">
<PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<table id="outer_table" border=3 bordercolor="yellow">
<tr>
<td>
<table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10"
bordercolor="blue">
<thead>
<tr>
<td>公司名称</td>
<td>联系人姓名</td>
</tr>
</thead>
<tbody>
<tr height=25px valign="middle">
<td width="70">
<input id="input" type="radio" name="radio" />
</td>
<td width="110">
<div DATAFLD="公司名称">
</td>
<td width="70">
<div DATAFLD="联系人姓名">
</td>
</tr>
</tbody>
</table>
<table align="center" border=2>
<tr>
<td align="center">
<input id="first" type="button" value=" 第一页 " onclick="goFirstPage()">
<input id="next" type="button" value=" 下一页 " onclick="goNextPage()">
<input id="previous" type="button" value=" 上一页 " onclick="goPrePage()">
<input id="last" type="button" value=" 最后一页 " onclick="goLastPage()">
</td>
</tr>
<tr>
<td align="center">
<input type="button" value=" 确认 " onclick="hide()" />
<input type="button" value=" 取消 " onclick="hide()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜</title>
</head>
<body><script language="JavaScript">
crossobj=document.getElementById("data");
document.onmousedown=initializedrag;
document.onmouseup=new Function("dragapproved=false");
function initializedrag(){
if(event.srcElement.id=="data"){
offsetx=event.clientX;
offsety=event.clientY;
tempx=parseInt(crossobj.style.left);
tempy=parseInt(crossobj.style.top);
dragapproved=true;
document.onmousemove=drag_drop;
}
}
function drag_drop(){
if(dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx;
crossobj.style.top=tempy+event.clientY-offsety;
return false;
}
}
function show()
{
document.getElementById("main").style.display="none";
document.getElementById("main").style.visibility="hidden";
document.getElementById("data").style.display="block";
document.getElementById("data").style.visibility="visible";
}
function hide()
{
document.getElementById("main").style.display="block";
document.getElementById("data").style.visibility="hidden";
} function goNextPage()
{
myTable1.nextPage();
}
function goPrePage()
{
myTable1.previousPage();
}
function goFirstPage()
{
myTable1.firstPage();
}
function goLastPage()
{
myTable1.lastPage();
}</script><div id="main" style="visiblity: visible">
<input type="text" value="" />
<input type="button" value="click" onclick="show()" />
</div><div id="data" style="position:absolute;padding:5px;z-index:100;cursor:hand;left:50px;top:50px;display:none">
移动栏
<OBJECT
ID="myData1" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
BORDER="0" WIDTH="0" HEIGHT="0">
<PARAM NAME="DataURL" value="data2.txt">
<PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<table id="outer_table" border=3 bordercolor="yellow">
<tr>
<td>
<table border=2 id="myTable1" DATASRC=#myData1 DATAPAGESIZE="10"
bordercolor="blue">
<thead>
<tr>
<td>公司名称</td>
<td>联系人姓名</td>
</tr>
</thead>
<tbody>
<tr height=25px valign="middle">
<td width="70">
<input id="input" type="radio" name="radio" />
</td>
<td width="110">
<div DATAFLD="公司名称">
</td>
<td width="70">
<div DATAFLD="联系人姓名">
</td>
</tr>
</tbody>
</table>
<table align="center" border=2>
<tr>
<td align="center">
<input id="first" type="button" value=" 第一页 " onclick="goFirstPage()">
<input id="next" type="button" value=" 下一页 " onclick="goNextPage()">
<input id="previous" type="button" value=" 上一页 " onclick="goPrePage()">
<input id="last" type="button" value=" 最后一页 " onclick="goLastPage()">
</td>
</tr>
<tr>
<td align="center">
<input type="button" value=" 确认 " onclick="hide()" />
<input type="button" value=" 取消 " onclick="hide()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>