このコードは、Firefox & IE では動作しますが、Chrome では動作しません。よろしくお願いします。
関数 printdata() {
var printHtml = "";
printHtml = printHtml + "<html>";
printHtml = printHtml + "<head>";
printHtml = printHtml + "<title>www.MyDomain.com</title>";
printHtml = printHtml + "<style>body{background:#fff;} .allow_border td{border:1px solid #000; padding:2px 5px;} div{text-align:left;}</style>";
printHtml = printHtml + "</head>";
printHtml = printHtml + "<body>";
printHtml = printHtml + "<div>";
printHtml = printHtml + document.getElementById("divPrintArea").innerHTML;
printHtml = printHtml + "</div>";
printHtml = printHtml + "</body>";
win = window.open('XXXXXXX', 'XXXXXXX', 'width=1,height=1,left=250,top=250');
win.document.write(printHtml);
win.document.close();
win.focus();
win.print();