function printdiv() { var headstr = ""; var footstr = ""; var newstr = document.getElementById("pDiv").innerHTML; var oldstr = document.body.innerHTML; document.body.innerHTML = headstr + newstr + footstr; window.print(); document.body.innerHTML = o
代码如下: var hkey_root = “HKEY_CURRENT_USER”; var hkey_path = “\\Software\\Microsoft\\Internet Explorer\\PageSetup\\”; var hkey_key; function printPage() { try { var RegWsh = new ActiveXObject(“Wscr ipt.Shell”); hkey_key = “header” RegWsh.RegWrite(hkey_