malihehshajari
شنبه 19 بهمن 1392, 13:51 عصر
سلام
من میخوام از صفحه پرینت بگیرم و مستقیم صفحه رو بفرستم روی پرینتر بدون اینکه کاربر صفحه انتخاب پرینتر ها رو ببینه
کد زیر رو نوشتم :
<script type="text/javascript">
function m(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'my div', 'height=400,width=600');
mywindow.document.write('<html><head><title>my div</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
mywindow.close();
return true;
}
</script>
ولی این صفحه پرینتر ها رو نشون میده
یک سوال دیگه چطور میتونم از داخل برنامه پرینتر رو انتخاب کنم ؟؟؟؟؟؟؟؟؟؟؟؟؟
با تشکر
من میخوام از صفحه پرینت بگیرم و مستقیم صفحه رو بفرستم روی پرینتر بدون اینکه کاربر صفحه انتخاب پرینتر ها رو ببینه
کد زیر رو نوشتم :
<script type="text/javascript">
function m(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'my div', 'height=400,width=600');
mywindow.document.write('<html><head><title>my div</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
mywindow.close();
return true;
}
</script>
ولی این صفحه پرینتر ها رو نشون میده
یک سوال دیگه چطور میتونم از داخل برنامه پرینتر رو انتخاب کنم ؟؟؟؟؟؟؟؟؟؟؟؟؟
با تشکر