复制代码 代码如下:
if (resultInt > 0)
{
//清除验证码 ,显示执行结果,并转向新的地址
Session["YanZhengMa"] = "";
String caoCode = "if(confirm('提交成功,是否打印'))" +
"{" +
"window.location.href='printTKZ.aspx?type=BF&BMId=" + _flowidValue +"&bufeitime="+ _jfTimeValue +"&palJE=" +_shouXianValue + "&goTo=buFeiList.aspx';" +
"}" +
"else" +
"{" +
"window.location.href='buFeiList.aspx';" +
"}";
MessageBox.alert(Page, (object)caoCode);
}
复制代码 代码如下:
<script language="javascript">
function doPrint() {
bdhtml=window.document.body.innerHTML;
sprnstr=" <!--startprint-->";
eprnstr=" <!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
}
</script>
<!--startprint--> 放在打印地方的开头
<!--endprint-->打印地方的结尾
<a href="javascript:;">打 印 </a>
新闻热点
疑难解答
图片精选