<script language="javascript1.2">
function MaxTheWindow()
{
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
</script>
最小化、最大化、关闭窗口
<object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Minimize"></object>
<object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Maximize"></object>
<OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" value="Close"></OBJECT>
<input type=button value=最小化 οnclick=hh1.Click()>
<input type=button value=最大化 οnclick=hh2.Click()>
<input type=button value=关闭 οnclick=hh3.Click()>
网页上直接制做另存为的按钮
代码早就有 只是觉得没有什么用处 今天无意在一个网站上看到 顺手牵羊 :)
<object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" id="ObjWB" width=0 height=0>
</object>
<a href="javascript:void(0);" onClick="document.all.ObjWB.ExecWB(4,1);">Save As </a>
==================================================================================
MSDN中的原文件,列出了它的其它参数
<html>
<head>
<script language=vbscript>
SUB DoCmd(cmd, opt)
on error resume next
IEWB.ExecWB cmd, opt, 25, 75
MsgBox ("Error # " & CStr(Err.Number) & Chr(13) & Chr(10) & Err.Description)
END SUB
</script>
</head>
<body>
<object id="IEWB" width=0 height=0
classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
<hr>
<form name=myform>
<select name=CMDID>
<option value=1>OPEN</option>
<!--
<option value=2>NEW</option>
-->
<option value=3>SAVE</option>
<option value=4>SAVEAS</option>
<option value=5>SAVECOPYAS</option>
<option value=6>PRINT</option>
<option value=7>PRINTPREVIEW</option>
<option value=8>PAGESETUP</option>
<option value=9>SPELL</option>
<option value=10>PROPERTIES</option>
<option value=11>CUT</option>
<option value=12>COPY</option>
<option value=13>PASTE</option>
<option value=14>PASTESPECIAL</option>
<option value=15>UNDO</option>
<option value=16>REDO</option>
<option value=17>SelectALL</option>
<option value=18>CLEARSelectION</option>
<option value=21>UpdateCOMMANDS</option>
<option value=22>REFRESH</option>
<option value=23>STOP</option>
<option value=24>HIDETOOLBARS</option>
<option value=25>SETPROGRESSMAX</option>
<option value=26>SETPROGRESSPOS</option>
<option value=27>SETPROGRESSTEXT</option>
<option value=28>SETTITLE</option>
<option value=29>SETDOWNLOADSTATE</option>
<option value=30>STOPDOWNLOAD</option>
</select>
<select name=CMDOPT>
<option value=0>DODEFAULT</option>
<option value=1>PROMPTUSER</option>
<option value=2>DONTPROMPTUSER</option>
<option value=3>SHOWHELP</option>
</select>
<input type=button value="Execute" οnclick="DoCmd myform.CMDID.selectedIndex+1, myform.CMDOPT.selectedIndex">
</form>
<hr>
</body>
</html>
将当前窗口最大化代码JS代码
最新推荐文章于 2021-12-06 09:47:04 发布