是这样的,用DREAMWEAVER做公文表单,里面内容主要包括标题、正文、主题词、抄报、抄送。当正文内容多的时候,打印出来后,主题词、抄报、抄送这些都会自动显示到第二页的上面或者中间或者最下面,现在了,我就是想无论内容有多少,有多少页面,主题词、抄报、抄送这些都可以显示在最后一张页面的最底部不变?急!!!!!!!!!!!!!
那位大侠懂的麻烦赶紧发言,先谢谢了!!! 
问题补充:
不是在WORD里面做的,是在DREAMWEAVER里面,所以是没有页眉页脚的 公文里的发文稿纸,主题词和印发单位是要放在页面的底部的   
为了排版、打印的需要,用户有这样的要求。

解决方案 »

  1.   

    具体的不清楚,但你这个问题应该是可以通过javascript解决的,和php没啥关系可以上网baidu google下,搜下 “javascript 页眉 页脚” 之类的试试看
      

  2.   

    設一個DIV,指定在某個位置就OK
      

  3.   

    可以用CSS定位到底部,但是打印有时候内容多会分页,这样就不能保证主题词、抄报、抄送这些内容在最底部了。我要的是打印出来的效果,不是在页面上显示的效果。
    了解公文格式的人应该比较容易理解
      

  4.   


    可以用CSS定位到底部,但是打印有时候内容多会分页,这样就不能保证主题词、抄报、抄送这些内容在最底部了。 我要的是打印出来的效果,不是在页面上显示的效果。 
    了解公文格式的人应该比较容易理解
      

  5.   

    不太好弄,毕竟网页不是doc文档,页面安排不太好控制
    不过如果是设置页眉页脚的话,点击ie工具栏,文件-打印预览-页面设置,手动修改页眉页脚也可以
      

  6.   


    还是用CSS解决。CSS中可以指定样式表使用在哪个媒介上:屏幕?打印?
      

  7.   

    我要的是打印出来后的效果哦CSS可以解决??那相应的代码怎么写???请指教
      

  8.   

    那就需要指定IE打印的模板了
    参考这篇文章
    http://msdn.microsoft.com/en-us/library/bb250434.aspx下面是模板二的范例代码,没修改过的= =
    <!-- Template2.htm: Minimal Template Supporting Printing
    This template demonstrates a minimal print template with enough support to 
    enable printing as well as previewing. It is the same as tmplt1.htm with the 
    addition of the TEMPLATEPRINTER element and scripts to provide printing support. The scripts begin with the function CheckPrint. This function is the 
    onlayoutcomplete event handler for the second LAYOUTRECT element, wrapped in 
    a 100 millisecond timeout. CheckPrint checks the dialogArguments.__IE_PrintType 
    property to determine whether to preview the document, print the document first 
    prompting the user with the Print Dialog box, or print without prompting the 
    user at all. The timeout is important because the device context (DC) cannot 
    render to the printer or screen until the onlayoutcomplete event has finished. 
    The timeout delays printing until after the onlayoutcomplete event has been 
    consumed. A timeout of as little as one millisecond can be enough allow the 
    onlayoutcomplete event to finish. To be on the safe side, the timer is set for 
    100 milliseconds in this example.PrintPrep is an important function because it sets an onreadystatechange handler 
    to make sure the template's source document has been completely loaded into the 
    template before printing. --><HTML XMLNS:IE>
    <HEAD>
    <?IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">
    <STYLE TYPE="text/css">
    .lorstyle
    {
        width:5.5in;
        height:8in;
        margin:1in;
        background:white;   
        border:1 dashed gray;
    }
    .pagestyle

        width:8.5in;
        height:11in;
        background:#FFFF99;   
    border-left:1 solid black;
    border-top:1 solid black;
    border-right:4 solid black;
    border-bottom:4 solid black;
        margin:10px;
    }
    </STYLE>
    <SCRIPT LANGUAGE="JScript">
    function CheckPrint()
    {
    switch (dialogArguments.__IE_PrintType)
    {
    case "Prompt":
    if (printer.showPrintDialog()) 
    PrintPrep();
    break;
    case "NoPrompt":
    PrintPrep();
    break;
    case "Preview":
    default:
    break;
    }
    }function PrintPrep()
    {
    if (layoutrect1.contentDocument.readyState == "complete")
    {
    // This block will be called when printing with user prompt
    // because the Print dialog box gives time for the content
    // document to complete loading
    PrintNow();
    }
    else
    {
    // This block will usually be called when printing w/o user prompt
    // and sets an event handler that listens for the loading of the content
    // document before printing. Sometimes, however, the content document
    // will be loaded in time for the previous block to execute
    layoutrect1.contentDocument.onreadystatechange = PrintWhenContentDocComplete;
    }
    }function PrintWhenContentDocComplete()
    {
    if (layoutrect1.contentDocument.readyState == "complete")
    {
    layoutrect1.contentDocument.onreadystatechange = null;
    PrintNow();
    }
    }function PrintNow()
    {
    printer.startDoc("Printing from Tmplt2.htm");
    printer.printPage(page1);
    printer.printPage(page2);
    printer.stopDoc();
    }
    </SCRIPT>
    <IE:TEMPLATEPRINTER ID="printer"/>
    </HEAD><BODY><IE:DEVICERECT ID="page1" CLASS="pagestyle" MEDIA="print">
    <IE:LAYOUTRECT ID="layoutrect1" CONTENTSRC="document" CLASS="lorstyle" NEXTRECT="layoutrect2"/>
    </IE:DEVICERECT><IE:DEVICERECT ID="page2" CLASS="pagestyle" MEDIA="print">
    <IE:LAYOUTRECT ID="layoutrect2" CLASS="lorstyle" ONLAYOUTCOMPLETE="setTimeout('CheckPrint()', 100)"/>
    </IE:DEVICERECT></BODY>
    </HTML>