在windows环境,将数据库读出的数据表格在打印机上打印出来。php可以实现吗? 请问楼上的怎么实现谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在IE下的话,可以用js调用IE的打印功能啊。在网上随便拷来的function printPage($auto=1,$timeOut=10000) { if ($auto == 1) { echo " < SCRIPT LANGUAGE="JavaScript" > < !-- Begin if (window.print) { window.print(); } else { alert('No printer driver in your PC'); } // End -- > < /script > n"; } else { echo " < SCRIPT LANGUAGE="JavaScript" > < !-- Begin if (window.print) { setTimeout('printCheck()','$timeOut'); } else { alert('No printer driver in your PC'); } function printCheck() { agree = confirm('OK to print now?'); if (agree) window.print(); } // End -- > < /script > n"; } } php下的msword和pdf浏览下载怎么实现 关于页面跳转执行问题 大家进来帮帮忙 谢谢! 使用正则表达时,怎么处理掉字符串中正则表达的符号 mysql_connect 与 mysql_pconnect() 求一个写法。 生成BLOG地址问题 一个数组比较的问题 关于文件下载的疑问 对文件上传,大家有什么好建议? php setcookie问题 创建临时表,添加了数据,然后怎么用阿?? 设置register_globals = Off后session在两个页面间不能传递 急急急急!!!
在网上随便拷来的
function printPage($auto=1,$timeOut=10000) {
if ($auto == 1) {
echo "
< SCRIPT LANGUAGE="JavaScript" >
< !-- Begin
if (window.print) {
window.print();
}
else {
alert('No printer driver in your PC');
}
// End -- >
< /script >
n";
}
else {
echo "
< SCRIPT LANGUAGE="JavaScript" > < !-- Begin
if (window.print) {
setTimeout('printCheck()','$timeOut');
}
else {
alert('No printer driver in your PC');
}
function printCheck() {
agree = confirm('OK to print now?');
if (agree) window.print();
}
// End -- >
< /script >
n";
}
}