设置taget,可我不是用<a href="..." target="...">来写的,该怎么设置呢? 我没办法!

解决方案 »

  1.   

    你可以加一个打印按钮,让它执行到你的report.asp不就行了,
      

  2.   

    我不知道IFrame同Frame是否一样,下面的代码在打印Frame的时候通过: <html>
    <head>
    <script  language=javascript> 
    function  doPageSet(){ 
        WB.ExecWB(8,1) 
    } function  doPreview(){
    parent.PrintFrame.focus();
    parent.PrintFrame.status="";
        WB.ExecWB(7,1) 
    } function doPrint(){
    parent.PrintFrame.focus();
    parent.PrintFrame.status="";
    window.print();
    }
    </script>
    <link rel="stylesheet" href="Powerise.css" type="text/css">
    </head>
    <body>
    <%--<input value="123">
    <form>
    <input value="456">
    </form> --%><input type="button" name="Button" value="关闭窗口" onClick="document.all.WB.ExecWB(45,1)" class = "stbtm">
    <OBJECT  classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2  height=0  id=WB  width=0></OBJECT> 
    <input type = "BUTTON"  name = "btnPPView" onclick="doPreview()" value = "打印预览" class = "stbtm">
    <BUTTON  name = "btnPageSetup" onclick="doPageSet()" class = "stbtm">页面设置</BUTTON>   
    <BUTTON  name = "btnPrint" onclick="doPrint()" class = "stbtm">打印</BUTTON>   </body>
    </html>
    上面的是放置打印按钮的Frame,文件名为 printbutton.html,它同 doPrint 代码里面的 PrintFrame 在同一个框架里面,框架的代码如下:<frameset rows="40,*" frameborder="NO" border="0" framespacing="0"> 
      <frame name="topFrame" scrolling="NO" noresize src="printbutton.html" >
      <frame name="PrintFrame" src="PrintUserInfo.jsp">
    </frameset>你按照上面的方法试一下吧,我的打印机出问题了,没有办法帮你测试。
      

  3.   

    我不知道IFrame同Frame是否一样,下面的代码在打印Frame的时候通过: <html>
    <head>
    <script  language=javascript> 
    function  doPageSet(){ 
        WB.ExecWB(8,1) 
    } function  doPreview(){
    parent.PrintFrame.focus();
    parent.PrintFrame.status="";
        WB.ExecWB(7,1) 
    } function doPrint(){
    parent.PrintFrame.focus();
    parent.PrintFrame.status="";
    window.print();
    }
    </script>
    <link rel="stylesheet" href="Powerise.css" type="text/css">
    </head>
    <body>
    <%--<input value="123">
    <form>
    <input value="456">
    </form> --%><input type="button" name="Button" value="关闭窗口" onClick="document.all.WB.ExecWB(45,1)" class = "stbtm">
    <OBJECT  classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2  height=0  id=WB  width=0></OBJECT> 
    <input type = "BUTTON"  name = "btnPPView" onclick="doPreview()" value = "打印预览" class = "stbtm">
    <BUTTON  name = "btnPageSetup" onclick="doPageSet()" class = "stbtm">页面设置</BUTTON>   
    <BUTTON  name = "btnPrint" onclick="doPrint()" class = "stbtm">打印</BUTTON>   </body>
    </html>
    上面的是放置打印按钮的Frame,文件名为 printbutton.html,它同 doPrint 代码里面的 PrintFrame 在同一个框架里面,框架的代码如下:<frameset rows="40,*" frameborder="NO" border="0" framespacing="0"> 
      <frame name="topFrame" scrolling="NO" noresize src="printbutton.html" >
      <frame name="PrintFrame" src="PrintUserInfo.jsp">
    </frameset>你按照上面的方法试一下吧,我的打印机出问题了,没有办法帮你测试。