اوبالیت به بو
پنج شنبه 20 شهریور 1393, 17:14 عصر
سلام
من بوسیله این دستورات یک Div رو چاپ می کنم:
<script type="text/javascript" src="../../Scripts/Print/jquery-1.3.1.min.js"> </script>
<script type="text/javascript">
function PrintElem(elem) {
Popup($(elem).html());
}
function Popup(data) {
var mywindow = window.open('', 'myDiv', 'height=600,width=800');
mywindow.document.write('<html><head><title>myDiv</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>
اما مساله اینه که این اون چیزی که می خوام نیست. حتی شبیه چیدمان Div خودم هم نیست. من میخوام یک ساختار منظم و بهتری داشته باشه. مثل شکل سمت راست:
123322
من بوسیله این دستورات یک Div رو چاپ می کنم:
<script type="text/javascript" src="../../Scripts/Print/jquery-1.3.1.min.js"> </script>
<script type="text/javascript">
function PrintElem(elem) {
Popup($(elem).html());
}
function Popup(data) {
var mywindow = window.open('', 'myDiv', 'height=600,width=800');
mywindow.document.write('<html><head><title>myDiv</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>
اما مساله اینه که این اون چیزی که می خوام نیست. حتی شبیه چیدمان Div خودم هم نیست. من میخوام یک ساختار منظم و بهتری داشته باشه. مثل شکل سمت راست:
123322