function print_img()
{
    var frmright = window.parent.frames["frmRight"];
    if ( frmright != null )
    {
        frmright.print_img();
    }
}   <a href="javascript:print_img()" id="btPrint" class="lnk6w" runat="server">打印</a>这是一个打印的功能. 问题是打印出来的图片太大了.这代码不是我写的,我看不懂`` 查资料了 也没看懂```
现在是要把它打印出来的大小设置下打印机上是这个A6卡片105 * 148 毫米
请问下该怎么写呢?  是js写的``
求高手

解决方案 »

  1.   

    print_img()这个是自己些的方法还是frame对象默认就有的?
      

  2.   

    sos``````````````````````````````````````````````````````````````````````````````````````````````````````
      

  3.   

    最好也贴出print_img()
    因为目前就知道你调用了父窗体的frame。不清楚print_img()里面是否有设置的代码。
      

  4.   

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>温州房产档案查询系统</title>
        <link href="main.css" rel="stylesheet" type="text/css" />
    </head>
    <body id="imgBody">
    <script language="javascript">var cx = window.screen.availWidth;
    var cy = window.screen.availHeight;//alert( cx + "," + cy );window.parent.window.moveTo(0, 0);
    window.parent.window.resizeTo( cx, cy );var w = cx - 350;
    var h = cy - 300;
    //var sTxt = "<object id='axWCWebImage' classid='clsid:f677b009-1260-4abf-9d11-aae4a6d6413d'";
    var sTxt = "<object id='axWCWebImage' classid='http:WCWebImage.dll#WCWebImage.UCWebImageX'";
    sTxt += " width=" + w + " height=" + h + "></object>"
    document.writeln( sTxt );
    </script>
    </body>
    <script language="javascript">
    <!--function load_img(picid)
    {
        var svrPath = "<% =m_sSvrPath %>";
        //axWCWebImage.LoadImage(svrPath + "docviewimg.aspx?casenum=" + casenum + "&uid=" + uid + "&picid=" + picid);
        axWCWebImage.LoadImage(svrPath + "docviewimg.aspx?picid=" + picid);
        //axWCWebImage.LoadImage(picid);
        //alert(svrPath + "docviewimg.aspx?picid=" + picid); 
        axWCWebImage.ZoomAll();
    }function zoom_img_fit()
    {    axWCWebImage.ZoomAll();
    }function zoom_img_out()
    {
        axWCWebImage.ZoomScale(1.4);
    }function zoom_img_in()
    {
        axWCWebImage.ZoomScale(0.7);
    }function zoom_img_org()
    {
        axWCWebImage.ZoomToScale(1.0);
    }function print_img()
    {
        axWCWebImage.ImagePrint();
    }-->
    </script>
    </html>