1

PHP プロジェクトでバーコードを作成できたので、バーコードを印刷したいので、javascript を使用しますが、印刷部分の画像が表示されません。私のバーコード画像へのリンクはこれです

http://localhost/Labortory_Management_System/assets/barcode/test_1D.php?text=3921214754

物の画像を印刷するには?

PS

このJavaScriptを使用して画像を印刷します

<script type="text/javascript">

    function PrintElem(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>
4

0 に答える 0