通过js实现弹出窗口进行打印

function rundiff()
    {
       var aa=document.getElementById("hidvlaue").value;
       if(aa =="1")
       {
         p();
       }
       else
       {
         retUrl();
       }
    }
    function p()
    {
     var p1=document.getElementById("d1").style.display="none";
     window.print();
    }
    function retUrl()
    {
      window.open('../RoleAndPwoer/UserDetail.aspx?SID=1','','toolbar=0,menubar=0,location=0,status=0,left='+(window.screen.width-800)/2+',top='+(window.screen.height-600)/2+',height=600px,width=800px,scrollbars=yes')
    }

posted @ 2010-06-23 13:14  JasonNET  阅读(5499)  评论(0编辑  收藏  举报