不用吧,直接用php显示在ie里,再用ie打印好了
解决方案 »
- 防止死锁的方法
- 获取不到post的值
- php 怎樣不要最後字元?
- 在smarty里怎样循环显示数据库取出数据一组数据?
- 关于php的require引用文件问题
- 检测同一用户不能同时在线问题~~~~~!20回送
- Thinkphp 支付宝接口 isSign 跟 mysgin 不相等
- 求助贴: Warning: msg_get_queue(): failed for key 0x610005bd: File exists in
- 用PHP写的WEB程序,能不能使E地址栏上显示的是...jsp
- 大家推荐一个好的留言板程序,不要说我懒,我只是在做需求分析!
- 关于PHP的SetCookie函数的问题。如何定义全站Cookie?
- PHP聊天室问题,请帮帮忙!!没有思路?
用php来控制换页.
鞠躬!<html>
<head>
<script>
</script>
</head>
<body>
<?
$id=mssql_connect('server','sa');
$db=mssql_select_db('aaa');
$query="select t_a,t_b,t_c,t_d,t_e,md_f,md_g from t_table";
$result=mssql_query($query);
$i=0;
?>
<table border=1 width=900>
<tr bgcolor="#c8e3ff">
<th><font size=2>编号</font></th>
<th><font size=2>名称</font></th>
<th><font size=2>年龄</font></th>
<th><font size=2>学号</font></th>
<th><font size=2>班级</font></th>
<th><font size=2>科目</font></th>
<th><font size=2>考号</font></th></TR><?
while($r=mssql_fetch_array($result)) {?>
<form name="bbb">
<tr>
<td>
<font size=2>
<input type="button" name="goodsno" value="<? echo $r[t_a];?>" onclick="lw(<? echo $i;?>)">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsname" value="<? echo $r[t_b];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsstyle" value="<? echo $r[t_c];?>">
</font>
</td>
<td>
<font size=2><input type="text" name="passno" value="<? echo $r[t_d];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsclass" value="<? echo $r[t_e];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="makeunit" value="<? echo $r[t_f;?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="hgz" value="<? echo $r[t_g];?>">
</font>
</td>
</tr>
<?
$i++;}
?>
</table>
</form>
</body>
</html>
$i=0;
while($lines*($i+1)<200)
{
echo "表头";
mssql_query("select t_a,t_b,t_c,t_d,t_e,md_f,md_g from t_table limit $i*$lines,$lines");
echo ...
}大概这个意思,自己改一改。
<head>
<script>
</script>
</head>
<body>
<?
$id=mssql_connect('server','sa');
$db=mssql_select_db('aaa');
$query="select t_a,t_b,t_c,t_d,t_e,md_f,md_g from t_table";
$result=mssql_query($query);
$i=0;
?>
<table border=1 width=900>
<tr bgcolor="#c8e3ff">
<th><font size=2>编号</font></th>
<th><font size=2>名称</font></th>
<th><font size=2>年龄</font></th>
<th><font size=2>学号</font></th>
<th><font size=2>班级</font></th>
<th><font size=2>科目</font></th>
<th><font size=2>考号</font></th></TR><?
$i=0;while($r=mssql_fetch_array($result)) {if($i%$prows+1==1)echo '<tr style="page-break-after:always">
<th><font size=2>编号</font></th>
<th><font size=2>名称</font></th>
<th><font size=2>年龄</font></th>
<th><font size=2>学号</font></th>
<th><font size=2>班级</font></th>
<th><font size=2>科目</font></th>
<th><font size=2>考号</font></th>
</tr> ';$i++; ?>
<form name="bbb">
<tr>
<td>
<font size=2>
<input type="button" name="goodsno" value="<? echo $r[t_a];?>" onclick="lw(<? echo $i;?>)">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsname" value="<? echo $r[t_b];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsstyle" value="<? echo $r[t_c];?>">
</font>
</td>
<td>
<font size=2><input type="text" name="passno" value="<? echo $r[t_d];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="goodsclass" value="<? echo $r[t_e];?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="makeunit" value="<? echo $r[t_f;?>">
</font>
</td>
<td>
<font size=2>
<input type="text" name="hgz" value="<? echo $r[t_g];?>">
</font>
</td>
</tr>
<?
$i++;}
?>
</table>
</form>
</body>
</html>