📄 wm_checkin_full.html
字号:
<!-- check for different collection -->
<html>
<head>
<title>scale_font</title>
<meta name="description"
content="Webmonkey Array Enhancements: JavaScript 1.2, which works only in Netscape 4.0, adds several fundamental methods to the array object. A few of these very useful methods are included here in a form that can be used by 3.0 browsers.">
<meta name="keywords"
content="javascript, dhtml, javascript, code, scripting, dynamic, developer resource, developer, development, web
development, design, code, geek, warez, free, new, latest, news, tools,
info, tutorials, how-to, builder, web builder, page builder, javascript, dhtml, javascript, code, scripting, dynamic, developer resource,
developer, development, web development, design, code, geek, warez, free,
new, latest, news, tools, info, tutorials, how-to, builder, web builder,
page builder">
</head>
<body BGCOLOR="#ffffff" TEXT="#000000" link="#0000ff" Vlink="#660099">
<!-- TOP AD BANNER -->
<a
href="../../../tppmsgs/msgs0.htm#73" tppabs="http://nsads.hotwired.com/event.ng/Type=click&ProfileID=176&RunID=4311&AdID=5612&GroupID=1&FamilyID=415&TagValues=13.25.156.159.169.174.177.181.182.183.184.185.196.197.198.199.200.208.213.333.349.389.401.411.436.526&Redirect=http://www.microsoft.com/sitebuilder/vinterdev/vionsbn.asp?30600vibeta"
TARGET="_top"><nobr>
<p></nobr></a> </p>
<table border="0" cellpadding="0" width="530" celspacing="0">
<tr>
<td><font size="3" color="#0000FF" face="宋体"><a
href="../../../tppmsgs/msgs0.htm#52" tppabs="http://www.webmonkey.com.cn/design.html" target="_top">网页设计</a><a
href="../../../tppmsgs/msgs0.htm#53" tppabs="http://www.webmonkey.com.cn/html.html" target="_top">/HTML文件</a><a
href="../../../tppmsgs/msgs0.htm#32" tppabs="http://www.webmonkey.com.cn/dynamic_html.htm" target="_top">/动态HTML文件</a></font><a
href="../../../tppmsgs/msgs0.htm#54" tppabs="http://www.webmonkey.com.cn/stylesheets.html"><font size="2" color="#0000FF"
face="宋体">/Stylesheets</font></a><font size="3" color="#0000FF" face="宋体"><a
href="../../../tppmsgs/msgs0.htm#55" tppabs="http://www.webmonkey.com.cn/graphics.html" target="_top">/图形与字体</a><a
href="../../../tppmsgs/msgs0.htm#56" tppabs="http://www.webmonkey.com.cn/multimedia.html" target="_top">/多媒体</a></font><font
size="2" color="#0000FF" face="宋体"> </font></td>
</tr>
<tr>
<td><a href="../../../tppmsgs/msgs0.htm#57" tppabs="http://www.webmonkey.com.cn/browsers.html" target="_top"><font size="3"
color="#0000FF" face="宋体">浏览器</font></a><font size="2" color="#0000FF"
face="宋体"><a href="../../../tppmsgs/msgs0.htm#58" tppabs="http://www.webmonkey.com.cn/java.html">/Java</a><a
href="../../../tppmsgs/msgs0.htm#31" tppabs="http://www.webmonkey.com.cn/javascript.html">/JavaScript</a><a
href="../../../tppmsgs/msgs0.htm#33" tppabs="http://www.webmonkey.com.cn/perl.html">/<nobr>Perl</nobr></font><font
color="#0000FF" face="宋体">语言</font></a><nobr><font size="2" color="#0000FF"
face="宋体"><a href="../../../tppmsgs/msgs0.htm#59" tppabs="http://www.webmonkey.com.cn/backend.html">/Backend</a><a
href="../../../tppmsgs/msgs0.htm#60" tppabs="http://www.webmonkey.com.cn/e_business.htm">/</font><font size="3" color="#0000FF"
face="宋体">电子商务</font></a></nobr></td>
</tr>
<tr>
<td width="530"><br>
<font face="宋体"><nobr><!-- TOP NAVIGATION and SPONSOR STUFF --> <font size="5"><a
href="../../../tppmsgs/msgs0.htm#71" tppabs="http://www.webmonkey.com.cn/webmonkey.html"><b>webmonkey</b>/</a><a
href="../../../tppmsgs/msgs0.htm#31" tppabs="http://www.webmonkey.com.cn/javascript.html">javascript</a><a
href="code.htm" tppabs="http://www.webmonkey.com.cn/javascript/code/code.htm">/code/</a><a
href="editor_ext.htm" tppabs="http://www.webmonkey.com.cn/javascript/code/editor_ext.htm">editor_extension</a></font></nobr></font></td>
</tr>
<tr>
<td width="530"><font face="宋体" size="2">网猴的Javascript代码库收集了我们自己制作的代码、函数包、及网页编辑器功能扩展其<br>
中既有通用目的的编码,也有用于特定用途的程序、以及一些你可以以来改善你的网页的<br>
优秀设计思想。其中的代码你可以免费下载使用。</font></td>
</tr>
</table>
<table CELLPADDING="3" CELSPACING="0" BORDER="0" width="532">
<!-- AUTHOR IMAGE -->
<tr>
<!-- BUFFER -->
<td rowspan="100" width="10"><font face="宋体"><img
SRC="../../../static.wired.com/webmonkey/images/spacer.gif" tppabs="http://static.wired.com/webmonkey/images/spacer.gif" WIDTH="10" HEIGHT="1"></font></td>
<td width="165" valign="middle" align="right" colspan="2"></td>
<!-- HEADLINE -->
<td width="365" valign="middle"><font size="4" color="#ff3300" face="宋体"><br>
</font><font color="#ff3300" size="5"><b>WM-checkin(完整版)</b></font><font
face="宋体"><br>
<!-- BYLINE --> 作者:<font color="#0000FF">Taylor</font></font></td>
</tr>
<!-- SEE ALSO LINKS -->
<tr>
<td width="155" align="left" valign="top" bgcolor="#FFFFB5"><font face="宋体"><img
SRC="../../../static.wired.com/webmonkey/images/spacer.gif" tppabs="http://static.wired.com/webmonkey/images/spacer.gif" WIDTH="155" HEIGHT="1"><br>
<br>
<font size="3"><b>Related Library Items</b></font><br>
<font color="#ff3300">- - - - - - - - - -</font> <br>
</font><font size="3"><b><a href="wm_chg_link_bh.html" tppabs="http://www.webmonkey.com.cn/javascript/code/wm_chg_link_bh.html">网猴的变换链接行<br>
为(<font face="宋体">Change Link <br>
Behavior</font>)</a></b></font><font face="宋体"><big><br>
</big></font><font size="3">该<strong>行为</strong>能够使你改变<br>
网页中一个或多个定<br>
位链接将其指向不同<br>
的<font face="宋体">URL</font>。</font><font size="2" face="宋体"><br>
</font><p><font size="3"><a href="cookie.htm" tppabs="http://www.webmonkey.com.cn/javascript/code/cookie.htm"><b>网猴<font face="宋体">Cookies</font>集锦</b></a></font><font
face="宋体"><br>
</font><font size="3">这些函数可以大大简化你使用<font face="宋体">cookies</font>时<br>
的麻烦。</font><font size="2"><br>
</font><font face="宋体"><br>
<br>
</font></td>
<!-- BODY COPY -->
<!-- BUFFER -->
<td width="10" rowspan="100"></td>
<td width="357" valign="top" bgcolor="#ffffff" rowspan="100"><big> </big><font size="3"><table
width="357" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>这是编写跨平台动态<font face="宋体">HTML</font>非常重要的一项<br>
<font face="宋体">JavaScript </font>函数。它提取一个定位了的<font
face="宋体">HTML</font>元素<br>
的<font face="宋体">ID</font>,并返回一个对象引用。改完整版的函数比较<br>
长,但可以在<font face="宋体">Netscape</font>中应用嵌入的<font face="宋体"><tt>DIV</tt></font>,<font
face="宋体"> </font>及在<font face="宋体">IE</font><br>
中应用全球样式。<p><b>用法:</b><font face="宋体"><tt>foo = WM_checkIn('id')</tt>
</font></td>
</tr>
</table>
<p><b>欢迎剪贴使用<font face="宋体">!</b> </font></font><font size="2"></p>
<form>
<p><font face="宋体"><textarea cols="45" rows="20" wrap="off" name="WM_checkin_full">
<script language="JavaScript">
<!--
function WM_checkIn(WM_id) {
/*
WM_checkIn()
Takes the ID of a positioned HTML element and returns an object reference.
Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)
Author: Taylor
Author Email: taylor@wired.com
Author URL: http://www.taylor.org/
Usage: WM_checkIn('id')
*/
// First we initialize all the variables.
var theObj,ss,sr,i,j,WM_layers=new Array();
// This chunk handles the IE portion of the checkIn code.
if (document.all) {
// This checks to see if the inline style declaration has
// a position property associated with it. If not, it will
// scan the global stylesheets for the ID.
if((document.all[WM_id].style.position != 'absolute') && (document.all[WM_id].style.position != 'relative')){
// This little loop I'm very proud of, because it's kinda
// slick and I wrote it all myself. It loops through all
// global stylesheets and all the rules in each stylesheet,
// tests for the selected ID, then returns that as the object.
for (ss=0 ; ss < document.styleSheets.length; ss++) {
for (sr=0 ; sr < document.styleSheets(ss).rules.length; sr++) {
if (document.styleSheets(ss).rules(sr).selectorText == '#' + WM_id) {
theObj = document.styleSheets(ss).rules(sr).style;
break;
}
}
}
} else {
// This works the same as in the light version, so you can
// use inline styles.
theObj = document.all[WM_id].style;
}
} else if(document.layers) {
// Now we're in Netscapeland. The main problem here
// is finding the object in a maze of hierarchy.
// I wish I could say that I'm proud of this code,
// because it's really slick. Unfortunately, I ripped
// it off from Macromedia Dreamweaver's drag layer code
"../../..//.class" tppabs="http:///.class" (with permission, of course :-)
// Dreamweaver/Configuration/Behaviors/Actions/Drag Layer.htm
// It works wonderfully and solves the problem.
WM_layers = new Array();
with (document) {
for (i=0; i<layers.length; i++) WM_layers[i]=layers[i]; {
for (i=0; i<WM_layers.length; i++) {
if (WM_layers[i].document && WM_layers[i].document.layers) {
for (j=0; j<WM_layers[i].document.layers.length; j++) {
WM_layers[WM_layers.length] = WM_layers[i].document.layers[j];
}
if(WM_layers[i].name == WM_id){
// So if the code matches the name of the layer,
// return the reference.
theObj = WM_layers[i];
}
}
}
}
}
}
return theObj;
}
// -->
</script>
</textarea><script language="JavaScript">
function WM_checkIn(WM_id) {
/*
WM_checkIn()
Takes the ID of a positioned HTML element and returns an object reference.
Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)
Author: Taylor
Author Email: taylor@wired.com
Author URL: http://www.taylor.org/
Usage: WM_checkIn('id')
*/
// First we initialize all the variables.
var theObj,ss,sr,i,j,WM_layers=new Array();
// This chunk handles the IE portion of the checkIn code.
if (document.all) {
// This checks to see if the inline style declaration has
// a position property associated with it. If not, it will
// scan the global stylesheets for the ID.
if((document.all[WM_id].style.position != 'absolute') && (document.all[WM_id].style.position != 'relative')){
// This little loop I'm very proud of, because it's kinda
// slick and I wrote it all myself. It loops through all
// global stylesheets and all the rules in each stylesheet,
// tests for the selected ID, then returns that as the object.
for (ss=0 ; ss < document.styleSheets.length; ss++) {
for (sr=0 ; sr < document.styleSheets(ss).rules.length; sr++) {
if (document.styleSheets(ss).rules(sr).selectorText == '#' + WM_id) {
theObj = document.styleSheets(ss).rules(sr).style;
break;
}
}
}
} else {
// This works the same as in the light version, so you can
// use inline styles.
theObj = document.all[WM_id].style;
}
} else if(document.layers) {
// Now we're in Netscapeland. The main problem here
// is finding the object in a maze of hierarchy.
// I wish I could say that I'm proud of this code,
// because it's really slick. Unfortunately, I ripped
// it off from Macromedia Dreamweaver's drag layer code
"../../..//.class" tppabs="http:///.class" (with permission, of course :-)
// Dreamweaver/Configuration/Behaviors/Actions/Drag Layer.htm
// It works wonderfully and solves the problem.
WM_layers = new Array();
with (document) {
for (i=0; i<layers.length; i++) WM_layers[i]=layers[i]; {
for (i=0; i<WM_layers.length; i++) {
if (WM_layers[i].document && WM_layers[i].document.layers) {
for (j=0; j<WM_layers[i].document.layers.length; j++) {
WM_layers[WM_layers.length] = WM_layers[i].document.layers[j];
}
if(WM_layers[i].name == WM_id){
// So if the code matches the name of the layer,
// return the reference.
theObj = WM_layers[i];
}
}
}
}
}
}
return theObj;
}
</script> </font></p>
</form>
<p><font face="宋体"><br>
<!-- AUTHOR TAGLINE --> </font></font></td>
</tr>
<tr>
<td width="155" valign="bottom" bgcolor="#FFFFB5"><font face="宋体"><br>
</font><font size="2" face="宋体">问题? 建议? 请<a href="mailto:bruce@itc.cn.net">告诉</a>网猴。</font></td>
</tr>
</table>
<p><font face="宋体"><br>
</font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -