最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用在PHP里的JS打印函数
时间:2022-07-02 10:07:47 编辑:袖梨 来源:一聚教程网
auto=1立即PRINT,否则timeOut毫秒后PRINT,如printPage(0,5000);
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";
}
}
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";
}
}
相关文章
- 豆包手机助手官网下载入口-豆包手机助手官方最新版地址 12-16
- 光与影33号远征队共享疗愈符文效果 共享疗愈符文在对战中的作用 12-16
- 妖精漫画免费下拉式阅读-妖精漫画免费登录下载入口今日开放 12-16
- 鹅鸭杀手游是哪个公司的游戏 游戏开发及发行商介绍 12-16
- 黑塔转圈圈官网入口一键直达-黑塔转圈圈网站地址链接直通 12-16
- 豆包官方网页版图文生成入口-豆包网页版解析工具 12-16