请问各位高手,在一页面上做一个层,能挡住下拉框,且又能拖动 用 iframe 做你的层载体, 可以参考我写的那个日历控件:http://www.meizz.com/web/download/Web_Calendar_30.rar 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在层中加一个空的iframe就可以了 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""><script language=javascript>var Obj;function MouseDown(obj){ Obj=obj; Obj.setCapture(); Obj.l=event.x-Obj.style.pixelLeft; Obj.t=event.y-Obj.style.pixelTop;}function MouseMove(){ if(Obj!=null) { Obj.style.left = event.x-Obj.l; Obj.style.top = event.y-Obj.t; }}function MouseUp(){ if(Obj!=null) { Obj.releaseCapture(); Obj=null; }}</script></HEAD><BODY><select><option>1</option></select><div id=aa name=aa style="position:absolute;left:10px;top:10px;" onmousedown="MouseDown(this)" onmouseup="MouseMove()" onmouseup="MouseUp();"><iframe id=tt name=tt src="about:<div style='width:100px;height:50px;border:1px solid red;' onmousedown='top.document.all.aa.setCapture();'>13</div>" width=100 height=50 frameborder=0 marginwidth=0 marginheight=0 ></iframe></div></BODY></HTML> 为了档住下拉框,将层的内容移到iframe里去的做法会破坏页面的结构,互动性不好,个人认为尽可能不用。在层的后面加个iframe当底,也可以解决此类问题。http://jkisjk.vip.sina.com/html/MoveTableWithMouse.htm 另外,查询框做成可移动的,有点好大喜功哦 ^_^ 容易让客户发挥想象力,给自己带来麻烦直接做成隐藏或不隐藏,相信一般的客户也能够接受。<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=ISO8859-1"><script language="JavaScript">function changeItemListNo(listNo){ document.all.itemListNo.value=listNo; document.frm.submit();}function OrderByFun(columnName){ if(columnName==document.all.orderByColumn.value) document.all.orderByType.value=3-document.all.orderByType.value; else { document.all.orderByColumn.value=columnName; document.all.orderByType.value=1; } document.frm.submit();}function ChangeFilterFun(){ if(filterTbody.style.display=="none") filterTbody.style.display=""; else filterTbody.style.display="none"}function ClearFilterFun(){ var theElements=document.frm.elements; for(var i=3;i<8;i++) { theElements[i].value=""; }}</script></head><body leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="5"><form method="post" name="frm" action="SourcingRequestList.htm" ><table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan=4 class="pageTitle" nowrap align="left" >Sourcing Request List</td> </tr> <tr> <td colspan=4 align="left" nowrap valign=bottom style="height:30"> <input type=button class="buttonLabel" value="Change Filters" onclick="ChangeFilterFun();"> <input type=button class="buttonLabel" value="Clear Filters" onclick="ClearFilterFun();"> <input type=button class="buttonLabel" value="Search" onclick="this.form.submit();" > </td> </tr> <tbody id=filterTbody style="display:none"> <tr> <td colspan=4 height="16"><hr></td> </tr> <tr> <td width="20%" class="attributeLabel" nowrap>Sourcing Request No.</td> <td colspan=3 class="attributeContent" nowrap> <input class="commonInputClass" name="sourcingRequestNoSearch" value="" maxlength=100 size="20" > </td> </tr> <tr> <td width="20%" class="attributeLabel" nowrap>Buyer</td> <td width="30%" class="attributeContent" nowrap> <input class="commonInputClass" name="buyerSearch" value="" maxlength=20 size="20" > </td> <td width="20%" class="attributeLabel" nowrap>Season</td> <td width="30%" class="attributeContent" nowrap> <input class="commonInputClass" name="seasonSearch" value="" maxlength=100 size="20" > </td> </tr> <tr> <td width="20%" class="attributeLabel" nowrap>Banner</td> <td width="30%" class="attributeContent" nowrap> <input class="commonInputClass" name="bannerSearch" value="" maxlength=20 size="20" > </td> <td width="20%" class="attributeLabel" nowrap>Commodity</td> <td width="30%" class="attributeContent" nowrap> <input class="commonInputClass" name="commoditySearch" value="" maxlength=100 size="20" > </td> </tr> </tbody> <tr> <td colspan=4 height="16"><hr></td> </tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="dataText" align="left" nowrap width="100%"> Page 1 of 1, Total : 3 </td> <td class="dataText" nowrap align="right">Go to Page<select name=pageNo class="dropDownBoxEnable" style="width:50" onchange="changeItemListNo(this.value);"><option value=1 selected>1 </select></td> <td class="dataText" nowrap align="right">| </td> <td class="dataText" nowrap align="right">First <td class="dataText" nowrap align="middle"> | </td> <td class="dataText" nowrap align="right">Previous <td class="dataText" nowrap align="middle"> | </td> <td class="dataText" nowrap align="right">Next <td class="dataText" nowrap align="middle"> | </td> <td class="dataText" nowrap align="right">Last <td class="dataText" nowrap align="middle"> |</td> </tr></table><table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr class="tableHeader"> <td nowrap style="cursor:hand" onclick="OrderByFun('orderNo')">Sourcing request No.<img src='../img/down.gif'></td> <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Buyer</td> <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Season</td> <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Banner</td> <td nowrap style="cursor:hand" onclick="OrderByFun('buyerStyleNo')">Commodity</td> </tr> <tr class="EvenOrOddRow"> <td nowrap ><a href="SourcingRequestView.htm?3">SR0003</a></td> <td >B</td> <td >Spring</td> <td >B</td> <td nowrap >Y</td> </tr> <tr class="EvenOrOddRow"> <td nowrap ><a href="SourcingRequestView.htm?2">SR0002</a></td> <td >B</td> <td >Spring</td> <td >B</td> <td nowrap >N</td> </tr> <tr class="EvenOrOddRow"> <td nowrap ><a href="SourcingRequestView.htm?1">SR0001</a></td> <td >D</td> <td >Fall</td> <td >D</td> <td nowrap >N</td> </tr> </table><input type=hidden name=operation value="" ><input type="hidden" name="itemListNo" value="1"><input type="hidden" name="itemListSize" value="15"><input type="hidden" name="orderByColumn" value="orderNo"><input type="hidden" name="orderByType" value="2"></form></body></html> jsp调用java script函数 vs2010里使用ActiveXObject html页面能够写jquery的ajax方法吗 javasc不返回false错误继续执行 请问用jQuery图片上传怎样实现实时预览? title属性的问题 要得到下啦列表,被选项得值,用什么,急 关于通过一个提交 有增删改三个按钮提交参数的问题 高分 请问如何获得下面代码的html格式代码? 下拉联动 $mailbody调出来的是代号 而不是文字??? 求一正则. 请教iframe的用法
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language=javascript>
var Obj;
function MouseDown(obj)
{
Obj=obj;
Obj.setCapture();
Obj.l=event.x-Obj.style.pixelLeft;
Obj.t=event.y-Obj.style.pixelTop;
}
function MouseMove()
{
if(Obj!=null)
{
Obj.style.left = event.x-Obj.l;
Obj.style.top = event.y-Obj.t;
}
}
function MouseUp()
{
if(Obj!=null)
{
Obj.releaseCapture();
Obj=null;
}
}
</script>
</HEAD><BODY>
<select>
<option>1</option>
</select>
<div id=aa name=aa style="position:absolute;left:10px;top:10px;" onmousedown="MouseDown(this)" onmouseup="MouseMove()" onmouseup="MouseUp();">
<iframe id=tt name=tt src="about:<div style='width:100px;height:50px;border:1px solid red;' onmousedown='top.document.all.aa.setCapture();'>13</div>" width=100 height=50 frameborder=0 marginwidth=0 marginheight=0 ></iframe>
</div></BODY>
</HTML>
将层的内容移到iframe里去的做法会破坏页面的结构,互动性不好,个人认为尽可能不用。
在层的后面加个iframe当底,也可以解决此类问题。http://jkisjk.vip.sina.com/html/MoveTableWithMouse.htm
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO8859-1"><script language="JavaScript">function changeItemListNo(listNo)
{
document.all.itemListNo.value=listNo;
document.frm.submit();
}function OrderByFun(columnName)
{
if(columnName==document.all.orderByColumn.value)
document.all.orderByType.value=3-document.all.orderByType.value;
else
{
document.all.orderByColumn.value=columnName;
document.all.orderByType.value=1;
}
document.frm.submit();
}function ChangeFilterFun()
{
if(filterTbody.style.display=="none")
filterTbody.style.display="";
else
filterTbody.style.display="none"
}function ClearFilterFun()
{
var theElements=document.frm.elements;
for(var i=3;i<8;i++)
{
theElements[i].value="";
}}
</script>
</head>
<body leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="5">
<form method="post" name="frm" action="SourcingRequestList.htm" >
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td colspan=4 class="pageTitle" nowrap align="left" >Sourcing Request List</td>
</tr>
<tr>
<td colspan=4 align="left" nowrap valign=bottom style="height:30">
<input type=button class="buttonLabel" value="Change Filters" onclick="ChangeFilterFun();">
<input type=button class="buttonLabel" value="Clear Filters" onclick="ClearFilterFun();">
<input type=button class="buttonLabel" value="Search" onclick="this.form.submit();" >
</td>
</tr>
<tbody id=filterTbody style="display:none">
<tr>
<td colspan=4 height="16"><hr></td>
</tr>
<tr>
<td width="20%" class="attributeLabel" nowrap>Sourcing Request No.</td>
<td colspan=3 class="attributeContent" nowrap>
<input class="commonInputClass" name="sourcingRequestNoSearch" value="" maxlength=100 size="20" >
</td>
</tr>
<tr>
<td width="20%" class="attributeLabel" nowrap>Buyer</td>
<td width="30%" class="attributeContent" nowrap>
<input class="commonInputClass" name="buyerSearch" value="" maxlength=20 size="20" >
</td>
<td width="20%" class="attributeLabel" nowrap>Season</td>
<td width="30%" class="attributeContent" nowrap>
<input class="commonInputClass" name="seasonSearch" value="" maxlength=100 size="20" >
</td>
</tr>
<tr>
<td width="20%" class="attributeLabel" nowrap>Banner</td>
<td width="30%" class="attributeContent" nowrap>
<input class="commonInputClass" name="bannerSearch" value="" maxlength=20 size="20" >
</td>
<td width="20%" class="attributeLabel" nowrap>Commodity</td>
<td width="30%" class="attributeContent" nowrap>
<input class="commonInputClass" name="commoditySearch" value="" maxlength=100 size="20" >
</td>
</tr>
</tbody>
<tr>
<td colspan=4 height="16"><hr></td>
</tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataText" align="left" nowrap width="100%">
Page 1 of 1, Total : 3
</td>
<td class="dataText" nowrap align="right">Go to Page<select name=pageNo class="dropDownBoxEnable" style="width:50" onchange="changeItemListNo(this.value);">
<option value=1 selected>1 </select></td>
<td class="dataText" nowrap align="right">| </td>
<td class="dataText" nowrap align="right">
First
<td class="dataText" nowrap align="middle"> | </td>
<td class="dataText" nowrap align="right">
Previous
<td class="dataText" nowrap align="middle"> | </td>
<td class="dataText" nowrap align="right">
Next
<td class="dataText" nowrap align="middle"> | </td>
<td class="dataText" nowrap align="right">
Last
<td class="dataText" nowrap align="middle"> |</td>
</tr>
</table><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr class="tableHeader">
<td nowrap style="cursor:hand" onclick="OrderByFun('orderNo')">Sourcing
request No.<img src='../img/down.gif'></td>
<td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Buyer</td>
<td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Season</td>
<td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Banner</td>
<td nowrap style="cursor:hand" onclick="OrderByFun('buyerStyleNo')">Commodity</td>
</tr> <tr class="EvenOrOddRow">
<td nowrap ><a href="SourcingRequestView.htm?3">SR0003</a></td>
<td >B</td>
<td >Spring</td>
<td >B</td>
<td nowrap >Y</td>
</tr> <tr class="EvenOrOddRow">
<td nowrap ><a href="SourcingRequestView.htm?2">SR0002</a></td>
<td >B</td>
<td >Spring</td>
<td >B</td>
<td nowrap >N</td>
</tr> <tr class="EvenOrOddRow">
<td nowrap ><a href="SourcingRequestView.htm?1">SR0001</a></td>
<td >D</td>
<td >Fall</td>
<td >D</td>
<td nowrap >N</td>
</tr>
</table><input type=hidden name=operation value="" >
<input type="hidden" name="itemListNo" value="1">
<input type="hidden" name="itemListSize" value="15">
<input type="hidden" name="orderByColumn" value="orderNo">
<input type="hidden" name="orderByType" value="2">
</form>
</body>
</html>