显示效果

js简单打印表格

打印效果(在chrome能显示打印效果)

js简单打印表格

方法

    <table width="600px" border="1" align="center" cellspacing="0" cellpadding="0" bordercolor="#66CC99"></table>
window.print();

关键是设置bordercolor属性。

 

 

出现问题的代码:

<table width="600px" border="0" align="center" cellspacing="1" cellpadding="1" bgcolor="black"></table>


window.print();

这种方法显示的效果是这样的:

js简单打印表格

但是打印的时候没有边框:

js简单打印表格

 

 

相关文章:

  • 2021-11-28
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-07-16
  • 2021-11-04
  • 2021-08-31
  • 2022-12-23
  • 2021-10-25
  • 2021-11-27
相关资源
相似解决方案