对不起,我没有这个问题的具体标题,
我想用 window.open 方法打印一个表单,这是一段脚本:
<?php
include "connect.php";
$test = mysql_query("select * from dataorder order by idorder desc limit 1 ");
if (!test)
die ("Error... " .mysql_error());
while ($row = mysql_fetch_array ($test))
{
echo "ID number : $row[idorder] <br/><br/>";
echo "Name : $row[name] <br/><br/>";
echo "<div>";
echo "<input type=button name=back value='back'onClick='parent.location='reserve.php''>";
echo '<input type="submit"
class="btn btn-success"
name="print" value="print"
onClick="window.open("print.php?idorder="'.$row['idorder'].'","scrollwindow","top=200,left=350,width=680px,height=500")"
style="text-decoration:none">';
echo "</div>";
}
?>
“打印”按钮可以出现,但单击时没有响应。