51代码网ORACLEMYSQLSQL SERVER其它数据库java/jspasp/asp.netC/C++/VC++APP应用其它语言服务器应用
您现在的位置: 51代码网 >> asp.net >> 文章正文

asp IE直接打印 只能打印几个字母

更新时间:2012-1-7:  来源:51代码网

<script language="javascript" type="text/javascript">
  function preview() {
  bdhtml = window.document.body.innerHTML;
  sprnstr = "<!--startprint-->";
  eprnstr = "<!--endprint-->";
  prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
  prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
  window.document.body.innerHTML = prnhtml;
  window.print();
  }
</script>

<!--startprint-->
  <div id="note" class="utList">
  <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%"
  DataKeyNames="QuantityName" BorderWidth="4px" BorderColor="White" GridLines="Vertical"
  OnRowCommand="gvList_RowCommand" OnRowDataBound="gvList_RowDataBound">
  <RowStyle CssClass="no1" />
  <Columns>
…………………………
  </tr>
  </table>
  </EmptyDataTemplate>
  <HeaderStyle CssClass="title" />
  <AlternatingRowStyle CssClass="no2" />
  </asp:GridView>
  </div>
  <!--endprint-->
打印页面只显示这几个字母: "; eprnstr = "
是什么情况?

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 赞助商链接
    推荐文章
  • 此栏目下没有推荐文章
  • {
    设为首页 | 加入收藏 | 友情链接 | 网站地图 | 联系站长 |