日期:2014-05-16  浏览次数:20322 次

jsp 有用的例子
<html><head>

<sx:head/>
<title>RRS Dashboard</title>
</head>
<body>
<input id="sDate" type="hidden" value='<s:property value="startDate"/>'>
<input id="eDate" type="hidden" value='<s:property value="endDate"/>'>
<input id="oraginalSalesCheck" type="hidden" value='<s:property value="salesCheck"/>'>
<input id="RSalesCheck" type="hidden" value='<s:property value="returnSalescheck"/>'>
<input id="ExchangeOrderNbr" type="hidden" value='<s:property value="exchangeOrderNbr"/>'>
<input id="queryType" type="hidden" value='<s:property value="queryForward"/>'>

<s:set var="idCount" value="returnAuthIdCount"></s:set>
<s:set var="limitSize" value="queryLimitSize"></s:set>
<s:set var="islistAuthId" value="flag"></s:set>
<s:if test="#idCount>#limitSize">

<script>
var bln = window.confirm("There are more than "+${queryLimitSize}+" returnAuthIds("+${returnAuthIdCount}+"), are you sure to display?");
//alert(bln);  
if(bln == true){
if(document.getElementById('queryType').value == "preQueryReturnAuthId"){
window.location='viewReturnAuthId?startDate='+document.getElementById('sDate').value+'&endDate='+document.getElementById('eDate').value;
document.getElementById('sDate').value="";
document.getElementById('eDate').value="";
}else if(document.getElementById('queryType').value == "preQueryReturnAuthIdBySalesCheck"){
window.location='viewReturnAuthId!queryReturnAuthIdBySalesCheck?salesCheck=' + document.getElementById("oraginalSalesCheck").value;
document.getElementById("oraginalSalesCheck").value = "";
}else if(document.getElementById('queryType').value == "preQueryReturnAuthIdByReturnSalescheck"){
window.location='viewReturnAuthId!queryReturnAuthIdByReturnSalesCheck?returnSalescheck=' + document.getElementById("RSalesCheck").value;
document.getElementById("RSalesCheck").value = "";
}else if(document.getElementById('queryType').value == "preQueryReturnAuthIdByExchangeOrderNbr"){
window.location='viewReturnAuthId!queryReturnAuthIdByExchangeOrderNbr?exchangeOrderNbr=' + document.getElementById("ExchangeOrderNbr").value;
document.getElementById("ExchangeOrderNbr").value = "";
}else if(document.getElementById('queryType').value=="preQueryCanceledAuthIdByBatch"){
    window.location='viewReturnAuthId!queryCanceledAuthIdByBatch?startDate='+document.getElementById('sDate').value+'&endDate='+document.getElementById('eDate').value;
    document.getElementById('sDate').value="";
document.getElementById('eDate').value="";
    }else if(document.getElementById('queryType').value == "updatePending"){
    window.location='previewUpdate!listAuthId?startDate='+document.getElementById('sDate').value+'&endDate='+document.getElementById('eDate').value;;
    document.getElementById('sDate').value="";
document.getElementById('eDate').value="";
    }else{
window.history.back();
}
}
</script>

</s:if>
<s:elseif test="#idCount>=0 && #idCount<=#limitSize">
<script>
if(document.getElementById('queryType').value == "preQueryReturnAuthId"){
window.location='viewReturnAuthId?startDate='+document.getElementById('sDate').value+'&endDate='+document.getElementById('eDate').value;
document.getElementById('sDate').value="";
document.getElementById('eDate').value="";
}else if(document.getElementById('queryType').val