<body>
<form runat="server" id="task">
<input type="text" id="type" value="," style="display: none" />
<asp:ScriptManager runat="server" ID="ScriptManager1" EnableScriptGlobalization="true"
EnableScriptLocalization="true">
</asp:ScriptManager>
<script language="javascript" type="text/javascript"> document.onkeypress = function esckey() { if (event.keyCode == 27)//点击“ESC”键
{ window.close();
} } function ReturnValue() { window.opener.document.all.ctl00_ContentPlaceHolder_returnvalue.value = document.all.ctl00_ContentPlaceHolder_Parameters.value;
window.opener.document.all.ctl00_ContentPlaceHolder_SupplieProductSave.click();
document.all.ctl00_ContentPlaceHolder_Parameters.value = "";
}
</script>
<asp:UpdatePanel ID="MainPanel" runat="server">
<ContentTemplate>
<div class="print_panel" >
<div class="print_tit">
<a href="#" class="print_pdf" onclick="window.open(document.getElementById('ctl06').ClientController.m_exportUrlBase + encodeURIComponent('PDF'), '_blank')" >PDF</a>
<a href="#" class="print_excel" onclick="window.open(document.getElementById('ctl06').ClientController.m_exportUrlBase + encodeURIComponent('Excel'), '_blank')">Excel</a> <a href="#" onclick="window.close()" class="close">
(ESC)关闭 X</a>
</div>
<div class="pr_c_panel">
<Reprot:ReportViewer ID="ReportViewer" runat="server" Width="700px" Height="700px">
</Reprot:ReportViewer>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
问题:进入页后,使用ESC,页面关闭。单击Reprot后,esckey()事件不好用,页面无法关闭,请求支援!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货