migrate to new git
This commit is contained in:
41
web/admin/print/print_multi.aspx
Normal file
41
web/admin/print/print_multi.aspx
Normal file
@@ -0,0 +1,41 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="print_multi.aspx.cs" Inherits="admin_print_print_multi" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>列印文件</title>
|
||||
<script src="https://code.jquery.com/jquery-3.6.2.min.js"></script>
|
||||
<link rel="stylesheet" href="print.css?v=202412061514" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div class="pages">
|
||||
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="word" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
</form>
|
||||
<script src="print.js?v=202412061514"></script>
|
||||
<script type="text/javascript">
|
||||
window.onload = function () {
|
||||
//$(".mid_text").each(function(i,t){console.log($(t).html().replace("<br>",""))});
|
||||
//檢查C#:不要多一個<br>
|
||||
var items=document.querySelectorAll(".mid_text");
|
||||
items.forEach((t,i)=>{
|
||||
//console.log(t);
|
||||
var s1=t.innerHTML.replace("<br>","");
|
||||
var s2=t.style.cssText.replace("--lines: 2","--lines:1");
|
||||
//t.innerHTML=s1;
|
||||
//t.style=s2;
|
||||
});
|
||||
|
||||
window.print();
|
||||
//setTimeout(function () { window.close(); }, 1);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user