分类: Java
2007-08-16 17:13:08
<%@ page contentType="text/html; charset=gb2312" language="java"
%>
window.onload = historyOncemore;
window.onbeforeunload = fixHistory;
function
fixHistory() //记住历史
{
document.all("theHistoryRecord").value=document.all("thedetailtableDIV").innerHTML.replace(/\n/g,"");
}
function historyOncemore() //恢复历史
{
if
(document.all("theHistoryRecord").value!="")
{document.all("thedetailtableDIV").innerHTML=document.all("theHistoryRecord").value;
}
}
function selectallcheckbox(obj) //全选或全不选
{
var
tureorfalse=obj.checked;
var theDetail=tbDetailUsed.rows;
for(var
i=0;i
theDetail[i].all("record_select").checked=tureorfalse;
}
}
function
addDetailProcess(afterRowIndex) //增加明细
{
var alltbDetailUsed=
document.all("tbDetailUsed").rows;
var theFirstSelectedDetail;
if
(afterRowIndex==null)
{
theFirstSelectedDetail=alltbDetailUsed.length-2;
}
else
theFirstSelectedDetail=afterRowIndex;
var newRow =
document.all("tbDetailPrepare").rows[0].cloneNode(true);
var desRow =
alltbDetailUsed[theFirstSelectedDetail+1];
desRow.parentElement.insertBefore(newRow,desRow
);
}
function delDetailProcess() //删除明细
{
var
alltbDetailUsed= document.all("tbDetailUsed").rows;
if
(confirm("确定选择正确并且要将这些明细删除")==false) return false;
for(var
i=0;i
if
(alltbDetailUsed[i].all("record_select").checked==true)
{
document.all("tbDetailUsed").deleteRow(i);
i=i-1;
}
}
}
function submitProcess()
{
document.frm.submit();
}