日期:2014-05-17 浏览次数:20525 次
<script language="javascript" type="text/javascript">
var filename;
function winPrintDialogBox(filename) {
var oShell = new ActiveXObject("WScript.Shell");
sRegVal = 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\Device';
var sName = oShell.RegRead(sRegVal)
if (sName == '') {
alert('Please, Check the Default Printer');
}
document.getElementById("hdnResultValue").value = sName;
return sName;
}
function HandleError()
{
alert("\nNothing was printed. \n\nIf you do want to print this page, then\nclick on the printer icon in the toolbar above.")
return false;
}
</script>