页面:
<!-- <a href="#" onclick="function(){distribute!export.action?ddept=${ddept}&planDateStr=${planDateStr}&mflag=export}"> -->
<!-- <a href="javascript:this.frmServices.submit();"> -->
<a href="#" onclick="expt();">
<img src="${ctx}/img/button_excel.jpg" border="0" width="67" height="23" alt="导出">
</a>
<!--<a href="${ctx}/duty/distribute/distribute!listDisplay.action?year=${year}&month=${month}&planDateStr=${planDateStr}&ddept=${ddept}&mflag=print";>-->
<a href="#" onclick="prnt();">
<img src="${ctx}/img/button_print.jpg" border="0" width="67" height="23" alt="打印">
</a>
<a href="${ctx}/duty/distribute/distribute-query.action">
<img src="${ctx}/img/button_return.jpg" border="0" width="67" height="23" alt="返回">
</a>
<!-- 下面的js处理 得到第一次进来下拉框没有选择的时候的值 -->
//第一次进来下拉框的值传递,并导出
function expt(){
var v1=document.getElementById("ddept").value;
var v2=document.getElementById("planDateStr").value;
//alert(v1);
var url="${ctx}/duty/distribute/distribute!listDisplay.action?ddept="+v1+"&planDateStr="+v2+"&mflag=export";
document.URL=url;
}
//第一次进来下拉框的值传递,并打印
function prnt(){
var v1=document.getElementById("ddept").value;
var v2=document.getElementById("planDateStr").value;
var vm=document.getElementById("month").value;
var vy=document.getElementById("year").value;
//alert(v1);
var url="${ctx}/duty/distribute/distribute!listDisplay.action?year="+vy+"&month="+vm+"&planDateStr="+v2+"&ddept="+v1+"&mflag=print";
document.URL=url;
}