67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PatientDocument.aspx.cs"
|
|
Inherits="BeginScreen.PatientDocument" %>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head runat="server">
|
|
<title>患者文书</title>
|
|
<style type="text/css" media="print">
|
|
@page {
|
|
size: auto;
|
|
margin: 0mm;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
function print_page() {
|
|
if (!!window.ActiveXObject || "ActiveXObject" in window) {
|
|
remove_ie_header_and_footer();
|
|
}
|
|
bdhtml = window.document.body.innerHTML; //获取当前页的html代码
|
|
sprnstr = "<!--startprint-->"; //设置打印开始区域
|
|
eprnstr = "<!--endprint-->";//设置打印结束区域
|
|
prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);//从开始代码向后取html
|
|
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));//从结束代码向前取html
|
|
window.document.body.innerHTML = prnhtml;
|
|
window.print();
|
|
};
|
|
|
|
function remove_ie_header_and_footer() {
|
|
var hkey_root, hkey_path, hkey_key;
|
|
hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
|
|
try {
|
|
var RegWsh = new ActiveXObject("WScript.Shell");
|
|
RegWsh.RegWrite(hkey_path + "header", "");
|
|
RegWsh.RegWrite(hkey_path + "footer", "");
|
|
} catch (e) { }
|
|
}
|
|
function fun(obj) {
|
|
var curimgpath = '/' + obj.innerHTML;
|
|
var img = document.getElementById('CurImg');
|
|
var a = document.getElementById('CurImg');
|
|
img.src =window.location.origin+"/"+ curimgpath;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form id="form1" runat="server">
|
|
<div>
|
|
<%--<input type="button" id="print" name="print" value="打印" onclick="javascript: print_page()" />--%>
|
|
</div>
|
|
<div>
|
|
|
|
<div style="float: left">
|
|
<%--<asp:TreeView ID="TreeViewPic" runat="server"
|
|
OnSelectedNodeChanged="TreeViewPic_SelectedNodeChanged">
|
|
</asp:TreeView>--%>
|
|
</div>
|
|
<div style="float: left">
|
|
<%--<img id="CurImg" src="" alt="" height="1100" width="780"/>--%>
|
|
<!--startprint-->
|
|
<%--<asp:Image ID="Image1" ImageUrl="" Width="780" Height='1100' Visible="false" runat="server" />--%>
|
|
<!--endprint-->
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|