81,094
社区成员
发帖
与我相关
我的任务
分享
String result = "<td class=\"name\">是否保本</td>";
//匹配<td></td>
Pattern p = Pattern.compile("(<td class=\"name\">[^<]+</td>)|(<td class=\"value\">[^<]+</td>)");
Matcher mather = p.matcher(result);
while(mather.find()) {
String temp = mather.group();
//替换<td></td>后的结果
temp = temp.replaceAll("(<td[^>]+>)|(</td>)", "");
System.out.println(temp);
}
page1
page2
//设置打印 <script language=javascript> function window.onload() { // -- advanced features factory.printing.SetMarginMeasure(2) // measure margins in inches factory.printing.SetPageRange(false, 1, 3) // need pages from 1 to 3 factory.printing.printer = "HP DeskJet 870C" factory.printing.copies = 2 factory.printing.collate = true factory.printing.paperSize = "A4" factory.printing.paperSource = "Manual feed" // -- basic features factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页" factory.printing.footer = "(自定义页脚)" factory.printing.portrait = false factory.printing.leftMargin = 0.75 factory.printing.topMargin = 1.5 factory.printing.rightMargin = 0.75 factory.printing.bottomMargin = 1.5 } function Print(frame) { factory.printing.Print(true, frame) // print with prompt }