很好用,也很麻烦。:)
IE6下更好点。
IE6下更好点。
解决方案 »
- 能提供像EXCEL那样冻结行列的代码,从事数据处理的人向你致敬!
- 动态加载的html,怎么样可以知道他什么时候加载完成?
- 求助帮助开发流程图()
- jquery datatable
- Jquery DOM Ajax 三者的关系是什么?
- 求助:关于flash 播放器 大家帮忙啊`!!!
- 有谁知道google map 的 “卫星”“地形”那些貌似按钮的东东是怎么做的?
- 按照屏幕分辨率设定图片大小(100分悬赏)
- 公司现在的项目表示层比较复杂,怎样面试一个做表示层的开发人员,应该问哪些问题?
- 高手救急!怎样在一个网页中读取另一个网页的信息?
- 还是弹出窗口!在线候答!!
- 请问ActiveX控件在网页上只自动下载注册一次即可?
单击Button1的时候总是提醒我“没权限”<HTML XMLNS:IE>
<HEAD>
<?IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">
<STYLE TYPE="text/css">
.lorstyle
{
width:5.5in;
height:8in;
margin:1in;
background:white;
border:1 dashed gray;
}
.pagestyle
{
width:8.5in;
height:11in;
background:#FFFF99;
border-left:1 solid black;
border-top:1 solid black;
border-right:4 solid black;
border-bottom:4 solid black;
margin:10px;
}
</STYLE>
<SCRIPT LANGUAGE="JScript">
function CheckPrint()
{
switch (dialogArguments.__IE_PrintType)
{
case "Prompt":
if (printer.showPrintDialog())
PrintPrep();
break;
case "NoPrompt":
PrintPrep();
break;
case "Preview":
default:
break;
}
}function PrintPrep()
{
if (layoutrect1.contentDocument.readyState == "complete")
{
// This block will be called when printing with user prompt
// because the Print dialog box gives time for the content
// document to complete loading
PrintNow();
}
else
{
// This block will usually be called when printing w/o user prompt
// and sets an event handler that listens for the loading of the content
// document before printing. Sometimes, however, the content document
// will be loaded in time for the previous block to execute
layoutrect1.contentDocument.onreadystatechange = PrintWhenContentDocComplete;
}
}function PrintWhenContentDocComplete()
{
if (layoutrect1.contentDocument.readyState == "complete")
{
layoutrect1.contentDocument.onreadystatechange = null;
PrintNow();
}
}function PrintNow()
{
printer.startDoc("Printing from Tmplt2.htm");
printer.printPage(page1);
printer.printPage(page2);
printer.stopDoc();
}
</SCRIPT>
<IE:TEMPLATEPRINTER ID="printer"/>
</HEAD><BODY>
<INPUT type="button" value="Button" ID="Button1" NAME="Button1" onclick="PrintNow()">
<IE:DEVICERECT ID="page1" CLASS="pagestyle" MEDIA="print">
<IE:LAYOUTRECT ID="layoutrect1" CONTENTSRC="document" CLASS="lorstyle" NEXTRECT="layoutrect2"/>
</IE:DEVICERECT><IE:DEVICERECT ID="page2" CLASS="pagestyle" MEDIA="print">
<IE:LAYOUTRECT ID="layoutrect2" CLASS="lorstyle" ONLAYOUTCOMPLETE="setTimeout('CheckPrint()', 100)"/>
</IE:DEVICERECT></BODY>
</HTML>