IE功能汇聚!!

Reker熊 2002-12-20 11:05:30
其实这篇文章我在asp版已经贴过了,所以问怎样打印预览、另存为等问题的大大减少,可是看js版还有不少网友问,顺便再贴一次吧
其中文章链接
http://expert.csdn.net/Expert/topic/1215/1215403.xml?temp=7.143801E-02

IE功能大汇聚

ie按钮

<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0>
</OBJECT>
<input onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开 name=Button1>
<input onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为 name=Button2>
<input onclick=document.all.WebBrowser.ExecWB(10,1) type=button value=属性 name=Button3>
<input onclick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印 name=Button>
<input onclick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置 name=Button4>
<br/>
<input onclick=window.location.reload() type=button value=刷新 name=refresh>
<input onclick="window.external.ImportExportFavorites(true,'');" type=button value=导入收藏夹 name=Button5>
<input onclick="window.external.ImportExportFavorites(false,'');" type=button value=导出收藏夹 name=Button32>
<input onclick="window.external.AddFavorite(location.href, document.title)" type=button value=加入收藏夹 name=Button22>
<br/>
<input onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)" type=button value=整理收藏夹 name=Submit2>
<input onclick='window.location="view-source:" + window.location.href' type=button value=查看源文件 name=Button7>
<input onclick="window.external.ShowBrowserUI('LanguageDialog', null)" type=button value=语言设置 name=Button6>
<input onclick=history.go(1) type=submit value=前进 name=Submit>
<input onclick=history.go(-1) type=submit value=后退 name=Submit2>
要完成此效果把如下代码加入到<body>区域中

<input type="button" name="Button" value="点击保存页面" onClick="document.all.WebBrowser.ExecWB(4,1)">
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</object>
………………………………………………………………………………………………………………………………
鼠标自定义
<script language=javascript>var Loaded=false;var Flag=false;</script>
<script src='http://files.cometsystems.com/&#106avascript/lc2000.js'
language=javascript></script>
<script language=javascript>if(Loaded&&Flag)TheCometCursor('cd_electric',0,626);</script>


要完成此效果把如下代码加入到<head>区域中

<SCRIPT LANGUAGE="javascript">
<!-- Begin
var x, y, xold, yold, xdiff, ydiff;
var dir = Array();
dir[0] = "n-resize";
dir[1]="ne-resize";
dir[2]="e-resize";
dir[3]="se-resize";
dir[4] = "s-resize";
dir[5]="sw-resize";
dir[6]="w-resize";
dir[7]="nw-resize";
document.onmousemove = FindXY;
function display(direction) {
document.body.style.cursor = dir[direction];
}
function FindXY(loc) {
x = (document.layers) ? loc.pageX : event.clientX;
y = (document.layers) ? loc.pageY : event.clientY;
xdiff = x - xold;
ydiff = y - yold
if ((xdiff < 2) && (ydiff < -2)) display(0);
if ((xdiff < 2) && (ydiff > 2)) display(4);
if ((xdiff > 2) && (ydiff < 2)) display(2);
if ((xdiff < -2) && (ydiff < 2)) display(6);
if ((xdiff > 2) && (ydiff > 2)) display(3);
if ((xdiff > 2) && (ydiff < -2)) display(1);
if ((xdiff < -2) && (ydiff > 2)) display(5);
if ((xdiff < -2) && (ydiff < -2)) display(7);
xold = x;
yold = y;
}
// End -->
</script>
...全文
83 36 打赏 收藏 转发到动态 举报
写回复
用AI写文章
36 条回复
切换为时间正序
请发表友善的回复…
发表回复
nclj2000 2003-05-08
  • 打赏
  • 举报
回复
d
heroqxn 2002-12-25
  • 打赏
  • 举报
回复
mark
oldsky 2002-12-25
  • 打赏
  • 举报
回复
gz
wxb80 2002-12-25
  • 打赏
  • 举报
回复
好啊
chili1979 2002-12-24
  • 打赏
  • 举报
回复
好! UP!
Reker熊 2002-12-24
  • 打赏
  • 举报
回复
下午1点准时结贴
adu_neu 2002-12-24
  • 打赏
  • 举报
回复
very good!
japhone 2002-12-23
  • 打赏
  • 举报
回复
好东东
自然之子 2002-12-23
  • 打赏
  • 举报
回复
up
sevenhzheleven 2002-12-23
  • 打赏
  • 举报
回复
很好啊~~精华耶~
meizz 2002-12-23
  • 打赏
  • 举报
回复
<body><SCRIPT LANGUAGE="JavaScript">
var s = "网页正文部分宽:"+ document.body.clientWidth;
s += "\r\n网页正文部分高:"+ document.body.clientHeight;
s += "\r\n网页正文部分上:"+ window.screenTop;
s += "\r\n网页正文部分左:"+ window.screenLeft;
s += "\r\n屏幕分辨率的高:"+ window.screen.height;
s += "\r\n屏幕分辨率的宽:"+ window.screen.width;
s += "\r\n屏幕可用工作区高度:"+ window.screen.availHeight;
s += "\r\n屏幕可用工作区宽度:"+ window.screen.availWidth;
alert(s);
</SCRIPT>
xieyj 2002-12-23
  • 打赏
  • 举报
回复
up
逍遥小贼 2002-12-23
  • 打赏
  • 举报
回复
好帖,收藏
up
Reker熊 2002-12-23
  • 打赏
  • 举报
回复
如果没人散自己的好东东的话,我就结贴了
zhanghk 2002-12-23
  • 打赏
  • 举报
回复
在Netscape下怎么做?我们要做兼容工作
yuanquana 2002-12-22
  • 打赏
  • 举报
回复
可有谁能告诉我,如何设置IE的打印页边距,document.all.WebBrowser.ExecWB(8,1) 只是弹出页面设置窗口,如果我想直接设置它的打印页边距,请问各位如何实现。
chinaillboy 2002-12-22
  • 打赏
  • 举报
回复
收藏。
imafool 2002-12-22
  • 打赏
  • 举报
回复
收藏。
llrock 2002-12-22
  • 打赏
  • 举报
回复
wanghr100 2002-12-22
  • 打赏
  • 举报
回复
不错啊.

收藏~~~~~~~~~
加载更多回复(16)

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧