想把录入在<table>内表单的内容在进入数据的同时打印出来,如何实施,请高人指点。部分代码如下:准备把<table>内的内容打印。<body style="background-color: #ffffff"> <form id="form1" runat="server">
<div style="text-align: center">
<span style="font-size: 14pt"><strong>收费管理</strong></span><br />
<table border=1>
<tr>
<td colspan="2" style="width: 846px; height: 11px">
IC卡号 <asp:TextBox ID="TextBox1" runat="server" Width="86px" AutoPostBack="true" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
<asp:Label ID="Label2" runat="server" ForeColor="red" ></asp:Label>车号<asp:TextBox ID="TextBox2" runat="server" Width="69px" ></asp:TextBox>
驾校<asp:TextBox ID="TextBox9" runat="server" Width="87px"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server" DataTextField="school_name" DataValueField="school_name" Width="104px">
</asp:DropDownList>
项目<asp:TextBox ID="TextBox10" runat="server" ReadOnly="True" Width="121px"></asp:TextBox>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" DataTextField="project_name" DataValueField="project_funds" Width="122px" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged">
</asp:DropDownList>价格<asp:TextBox ID="TextBox3" runat="server" Width="35px" AutoPostBack="True" ReadOnly="True"></asp:TextBox>元/小时</td>
<td rowspan="1" style="width: 59px">
</td>
</tr>
<tr>
<td colspan="2" style="width: 846px; height: 11px">
开始时间<asp:TextBox ID="TextBox5" runat="server" Width="117px" ReadOnly="True"></asp:TextBox>
结束结束<asp:TextBox ID="TextBox4" runat="server" Width="111px" ReadOnly="True"></asp:TextBox>
预用时<asp:TextBox
ID="TextBox12" runat="server"
Width="23px" AutoPostBack="True" OnTextChanged="TextBox12_TextChanged"></asp:TextBox>
<asp:Label ID="Label1" runat="server"></asp:Label>
小时 押金<asp:TextBox
ID="TextBox13" runat="server" Width="45px" ></asp:TextBox>元
<asp:Label ID="Label3" runat="server" BackColor="#C00000" BorderColor="White" Text="退押金"></asp:Label><asp:TextBox
ID="TextBox14" runat="server" Width="41px"></asp:TextBox></td>
<td style="width: 59px" rowspan="2">
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="确定" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="增加" /></td></tr><tr>
<td colspan="2" style="width: 846px; height: 28px;">
实际用时<asp:TextBox ID="TextBox6" runat="server" Width="131px" ReadOnly="True"></asp:TextBox>
费用<asp:TextBox
ID="TextBox7" runat="server" Width="89px"></asp:TextBox>元 实际收费<asp:TextBox ID="TextBox8"
runat="server" Width="85px"></asp:TextBox>
元 收费人<asp:TextBox ID="TextBox11" runat="server"
Width="103px"></asp:TextBox></td>
</tr></table>
<asp:GridView ID="GridView1" runat="server" 加入按钮后如何实施代码编写。
急啊
<div style="text-align: center">
<span style="font-size: 14pt"><strong>收费管理</strong></span><br />
<table border=1>
<tr>
<td colspan="2" style="width: 846px; height: 11px">
IC卡号 <asp:TextBox ID="TextBox1" runat="server" Width="86px" AutoPostBack="true" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
<asp:Label ID="Label2" runat="server" ForeColor="red" ></asp:Label>车号<asp:TextBox ID="TextBox2" runat="server" Width="69px" ></asp:TextBox>
驾校<asp:TextBox ID="TextBox9" runat="server" Width="87px"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server" DataTextField="school_name" DataValueField="school_name" Width="104px">
</asp:DropDownList>
项目<asp:TextBox ID="TextBox10" runat="server" ReadOnly="True" Width="121px"></asp:TextBox>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" DataTextField="project_name" DataValueField="project_funds" Width="122px" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged">
</asp:DropDownList>价格<asp:TextBox ID="TextBox3" runat="server" Width="35px" AutoPostBack="True" ReadOnly="True"></asp:TextBox>元/小时</td>
<td rowspan="1" style="width: 59px">
</td>
</tr>
<tr>
<td colspan="2" style="width: 846px; height: 11px">
开始时间<asp:TextBox ID="TextBox5" runat="server" Width="117px" ReadOnly="True"></asp:TextBox>
结束结束<asp:TextBox ID="TextBox4" runat="server" Width="111px" ReadOnly="True"></asp:TextBox>
预用时<asp:TextBox
ID="TextBox12" runat="server"
Width="23px" AutoPostBack="True" OnTextChanged="TextBox12_TextChanged"></asp:TextBox>
<asp:Label ID="Label1" runat="server"></asp:Label>
小时 押金<asp:TextBox
ID="TextBox13" runat="server" Width="45px" ></asp:TextBox>元
<asp:Label ID="Label3" runat="server" BackColor="#C00000" BorderColor="White" Text="退押金"></asp:Label><asp:TextBox
ID="TextBox14" runat="server" Width="41px"></asp:TextBox></td>
<td style="width: 59px" rowspan="2">
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="确定" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="增加" /></td></tr><tr>
<td colspan="2" style="width: 846px; height: 28px;">
实际用时<asp:TextBox ID="TextBox6" runat="server" Width="131px" ReadOnly="True"></asp:TextBox>
费用<asp:TextBox
ID="TextBox7" runat="server" Width="89px"></asp:TextBox>元 实际收费<asp:TextBox ID="TextBox8"
runat="server" Width="85px"></asp:TextBox>
元 收费人<asp:TextBox ID="TextBox11" runat="server"
Width="103px"></asp:TextBox></td>
</tr></table>
<asp:GridView ID="GridView1" runat="server" 加入按钮后如何实施代码编写。
急啊
解决方案 »
- DataRow类型向DataGridViewRow转换
- 子窗体的标题不在父窗体的标题上显示
- 在C#项目中引用Matlab的dll报错,说不兼容平台生成的程序集
- 各位 救命啊 !!!!!
- 看看这个线程 有什么问题 老是不对啊
- 未在本地计算机上注册“Micrsoft.Jet.OLEDB.4.0”提供程序
- 太简单的问题,简直就是送分
- 拷贝一个文件进度条的进度如何得到??
- 求XML Authority的下载地址!我找了好几个地方都下不来!
- 请问怎么通过天猫URL区分特定天猫的访问次数
- 怎么获取datagridview列头的值
- 求 C#版本,Winform(即windows窗口)程序开发 视频教程!! 不是asp.net的!不是web的!
<div style="text-align: center">
<span style="font-size: 14pt"><strong>收费管理</strong></span><br />
<table border=1>
<tr>
<td>驾校<asp:TextBox ID="TextBox9" runat="server" Width="87px"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server" DataTextField="school_name" DataValueField="school_name" Width="104px">
</asp:DropDownList>
项目
</td>
</tr>
<tr>
<td colspan="2" style="width: 846px; height: 11px">
开始时间<asp:TextBox ID="TextBox5" runat="server" Width="117px" ReadOnly="True"></asp:TextBox>
结束结束<asp:TextBox ID="TextBox4" runat="server" Width="111px" ReadOnly="True"></asp:TextBox>
<td>
</tr>
<table>
<asp:GridView ID="GridView1" runat="server" 加入按钮后如何实施代码编写。
急
<html>
<head>
<style media="print">
.noprint /*使用此样式的元素打印时不出现*/
{
display: none;
}
</style> <script type="text/javascript">
function printDoc() {
window.print();
}
</script></head>
<body>
<table>
<tr>
<td>
hello!
</td>
</tr>
</table>
<button onclick="printDoc();" class="noprint">
打印</button>
</body>
</html>
2.若你的页面内容是其中的一部分,则可以<input type="buttom" onclick="window.open(A.html)" value="打印">;a.html页面内容与打印相同,然后再在a.html页面中加入<script type="text/javascript">window.print();</script>