87,993
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/mingdan.css">
<title>abc</title>
<meta charset="utf-8">
<style>
.list-name-input{
color: #333;
font-family: tahoma, 'Microsoft YaHei', 'Segoe UI', Arial, 'Microsoft Yahei', Simsun, sans-serif;
font-size: 11px;
font-weight: bold;
height: 18px;
margin: 1px;
padding: 1px;
position: relative;
width: 85px;
}
.list-name-for-select{
border: 0px;
color: #555;
height: 18px;
lighting-color: rgb(255, 255, 255);
line-height: 18px;
margin:0 0 0px 0;
outline-color: #555;
outline-offset: 0px;
outline-style: none;
outline-width: 0px;
padding: 1px 1px;
position: absolute;
top: 1px;
left: 1px;
vertical-align: middle;
width: 62px;
}
.list-name-input-for-select:focus{
border: 0;
border-radius: 0;
}
.list-select{
background-color: #FFF;
border:1px #ccc solid;
border-radius: 1px;
color: #555;
cursor: pointer;
height: 20px;
left: 0px;
margin:0 0 10px 0;
padding: 0px 0px;
position: absolute;
top: 0px;
vertical-align: middle;
white-space: pre;
width: 85px;
}
</style>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="0" bgcolor="#CCCCCC">
<tr><td height="28" bgcolor="#FFFFFF" align="center" valign="middle" width="100">
<div id="list-name-input_<%=i%>" class="list-name-input">
<select type="text" class="list-select" onChange="select1(1)" id="list-select_1">
<option value="" selected></option>
<option value="C001001">C001001</option>
<option value="C001001">C001002</option>
<option value="C001001">C001003</option>
</select>
<input type="text" maxlength="8" class="name item-width list-name-for-select" id="list-name-for-select_1">
</div>
</td>
<td align="center" width="30" bgcolor="#FFFFFF"><img src="images/modify1.gif" width="60%" style="cursor:hand" id="move_img1"></td>
</tr>
</table>
<script>
function select1(id)
{
var listName = document.getElementById('list-name-for-select_'+id);
var listSelect = document.getElementById('list-select_'+id);
listName.value=listSelect.value;
}
function select2(id)
{alert(id);
var listName = document.getElementById('list-name-for-select_'+id);
var listSelect = document.getElementById('list-select_'+id).onchange = function(e)
{
console.log(this)
if(this.value)
{
listName.value = this.value + ' | ' + this.options[this.selectedIndex].text;
}
else
{
listName.value = ''
}
};
}
</script>
<div id="abc" style="position:absolute;left:-500px;top:-400px;z-index:999;">
<table width="400" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td align="center" bgcolor="#000066" height="27"><strong><font color="#FFFFFF">序号</font></strong></td>
<td align="center" bgcolor="#000066"><strong><font color="#FFFFFF">费用类型</font></strong></td>
<td align="center" bgcolor="#000066"><strong><font color="#FFFFFF">欠费金额</font></strong></td>
<td align="center" bgcolor="#000066"><strong><font color="#FFFFFF">收款金额</font></strong></td>
<td align="center" bgcolor="#000066"><strong><font color="#FFFFFF">维护说明</font></strong></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF" height="27">1</td>
<td align="center" bgcolor="#FFFFFF">房租</td>
<td align="center" bgcolor="#FFFFFF">10000</td>
<td align="center" bgcolor="#FFFFFF"><input type="text" size="7" value="9000"></td>
<td align="center" bgcolor="#FFFFFF"><input type="text" size="7"></td>
</tr>
<tr><td colspan="5" bgcolor="#FFFFFF" align="center" height="27"><input type="submit" value="保存数据"></td></tr>
</table>
</div>
<!-- 层跟随鼠标位置显示 -->
<script type="text/javascript">
// window1改为window即可,层随鼠标点击移动
document.getElementById("move_img1").onclick = function(ev)
{
var oEvent=ev||event;
var oDiv=document.getElementById('abc');
oDiv.style.left=(oEvent.clientX+5)+'px'; // 指定创建的DIV在文档中距离左侧的位置
oDiv.style.top=(oEvent.clientY+10)+'px'; // 指定创建的DIV在文档中距离顶部的位置
}
</script> </body>
</html>