<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title></title>
</head>
<script language="javascript">
function moveItem(btn, ok) {
var targetID = ok ? 'RsvDiv' : 'UnRsvDiv';
document.getElementById(targetID).appendChild(btn.parentNode);
btn.onclick = function () { moveItem(this, !ok); }
btn.value = ok ? '移至未解决' : '移至已解决';
}
function DelItem(btn) {var item = btn.parentNode, p = item.parentNode;p.removeChild(item);}
</script>
<body>
<table style="width: 100%;">
<tr>
<td class="auto-style8" colspan="6" valign="top">
<div style="margin-top: 10px; margin-left: 60px">
<a style="float: left">已解决:</a>
<div id="RsvDiv" style="margin-left: 50px; width: 960px;">
<div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="1" />
<input id="Button1" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button7" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="2" />
<input id="Button9" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button10" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="3" />
<input id="Button11" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button12" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="4" />
<input id="Button13" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button14" type="button" value="移至未解决" onclick="moveItem(this)" />
</div>
</div>
</div>
<br />
<div style="margin-top: 10px; margin-left: 60px;">
<a style="float: left">未解决:</a>
<div id="UnRsvDiv" style="margin-left: 50px; width: 960px;">
<div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="5" />
<input id="Button5" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button6" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div><div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="6" />
<input id="Button2" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button3" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div><div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="7" />
<input id="Button4" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button8" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title></title>
</head>
<script language="javascript">
function moveItem(btn, ok) {
var targetID = ok ? 'RsvDiv' : 'UnRsvDiv';
document.getElementById(targetID).appendChild(btn.parentNode);
btn.onclick = function () { moveItem(this, !ok); }
btn.value = ok ? '移至未解决' : '移至已解决';
}
function DelItem(btn) {var item = btn.parentNode, p = item.parentNode;p.removeChild(item);}
</script>
<body>
<table style="width: 100%;">
<tr>
<td class="auto-style8" colspan="6" valign="top">
<div style="margin-top: 10px; margin-left: 60px">
<a style="float: left">已解决:</a>
<div id="RsvDiv" style="margin-left: 50px; width: 960px;">
<div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="1" />
<input id="Button1" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button7" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="2" />
<input id="Button9" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button10" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="3" />
<input id="Button11" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button12" type="button" value="移至未解决" onclick="moveItem(this)" />
</div><div>
<input name="txtRsv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="4" />
<input id="Button13" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button14" type="button" value="移至未解决" onclick="moveItem(this)" />
</div>
</div>
</div>
<br />
<div style="margin-top: 10px; margin-left: 60px;">
<a style="float: left">未解决:</a>
<div id="UnRsvDiv" style="margin-left: 50px; width: 960px;">
<div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="5" />
<input id="Button5" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button6" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div><div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="6" />
<input id="Button2" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button3" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div><div>
<input name="txtUnResv" type="text" style="margin-top: 5px; margin-left: 10px; width: 70%;" value="7" />
<input id="Button4" type="button" value="删除" onclick="DelItem(this)" /> <input id="Button8" type="button" value="移至已解决" onclick="moveItem(this,true)" />
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
var targetID = ok ? 'RsvDiv' : 'UnRsvDiv', item = btn.parentNode;
document.getElementById(targetID).appendChild(item);
btn.onclick = function () { moveItem(this, !ok); }
btn.value = ok ? '移至未解决' : '移至已解决';
var input = item.getElementsByTagName('input')[0];
if (window.ActiveXObject) {//IE不能修改name,用outerHTML来弄
input.outerHTML = input.outerHTML.replace(ok ? 'txtUnResv' : 'txtRsv', ok ? 'txtRsv' : 'txtUnResv');
}
else input.name = ok ? 'txtRsv' : 'txtUnResv';
}