<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> /*下面这些代码如果在你的浏览器看不到效果,就将上面的这个替换*/ <!--<TRS_DOCUMENTS ID='浮动图片' num='1'> <TRS_CONDITION CONDITION='@doctitle' OPERATOR='present' TYPE='STRING'> <div id="img01" style="position:absolute; 232px; height:141px"> <DIV onClick="hidead();" style=" position:relative; FONT-SIZE: 9pt; CURSOR: hand; top:0px;" align=right>关闭×</DIV> <a href="<TRS_DOCUMENT FIELD='_RECURL' AUTOLINK='false'/>" target="_blank"> <TRS_APPENDIX MODE='PIC' EXTRA='border=0'/> </a> </div> </TRS_CONDITION> </TRS_DOCUMENTS-->
<div id="img01" style="position:absolute; 232px; height:141px"> <DIV onClick="hidead();" style=" position:relative; FONT-SIZE: 9pt; CURSOR: hand; top:0px;" align=right>关闭×</DIV> <a href="" target="_blank"> <img src="" width="" height=""> </a> </div>
<SCRIPT language=javascript>
<!--
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img01.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img01.offsetHeight;
Woffset = img01.offsetWidth;
img01.style.left = xPos + document.body.scrollLeft;
img01.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
var obj=document.getElementById("img01")
function www_helpor_net() {
img01.visibility = "visible";
var interval = setInterval('changePos()', delay);
obj.onmouseover=function(){clearInterval(interval)}
obj.onmouseout=function(){interval = setInterval('changePos()', delay);
}
}
www_helpor_net();
function hidead(){
document.getElementById("img01").style.display="none";
}
//For more,visit:www.helpor.net
-->
</SCRIPT>
图片在网页中任意浮动,总在可用区域,图片随鼠标滚动而浮动。
1 keycode 8 = BackSpace BackSpace 2 keycode 9 = Tab Tab 3 keycode 12 = Clear 4 keycode 13 = Enter 5 keycode 16 = Shift_L 6 keycode 17 = Control_L 7 keycode 18 = Alt_L 8 keycode 19 = Pause 9 keycode 20 = Caps_Lock 10 keycode 27 = Escape Escape 11 keycode 32 = space space 12 keycode 33 = Prior 13 keycode 34 = Next 14 keycode 35 = End 15 keycode 36 = Home 16 keycode 37 = Left 17 keycode 38 = Up 18 keycode 39 = Right 19 keycode 40 = Down 20 keycode 41 = Select 21 keycode 42 = Print 22 keycode 43 = Execute 23 keycode 45 = Insert 24 keycode 46 = Delete 25 keycode 47 = Help 26 keycode 48 = 0 equal braceright 27 keycode 49 = 1 exclam onesuperior 28 keycode 50 = 2 quotedbl twosuperior 29 keycode 51 = 3 section threesuperior 30 keycode 52 = 4 dollar 31 keycode 53 = 5 percent 32 keycode 54 = 6 ampersand 33 keycode 55 = 7 slash braceleft 34 keycode 56 = 8 parenleft bracketleft 35 keycode 57 = 9 parenright bracketright 36 keycode 65 = a A 37 keycode 66 = b B 38 keycode 67 = c C 39 keycode 68 = d D 40 keycode 69 = e E EuroSign 41 keycode 70 = f F 42 keycode 71 = g G 43 keycode 72 = h H 44 keycode 73 = i I 45 keycode 74 = j J 46 keycode 75 = k K 47 keycode 76 = l L 48 keycode 77 = m M mu 49 keycode 78 = n N 50 keycode 79 = o O 51 keycode 80 = p P 52 keycode 81 = q Q at 53 keycode 82 = r R 54 keycode 83 = s S 55 keycode 84 = t T 56 keycode 85 = u U 57 keycode 86 = v V 58 keycode 87 = w W 59 keycode 88 = x X 60 keycode 89 = y Y 61 keycode 90 = z Z 62 keycode 96 = KP_0 KP_0 63 keycode 97 = KP_1 KP_1 64 keycode 98 = KP_2 KP_2 65 keycode 99 = KP_3 KP_3 66 keycode 100 = KP_4 KP_4 67 keycode 101 = KP_5 KP_5 68 keycode 102 = KP_6 KP_6 69 keycode 103 = KP_7 KP_7 70 keycode 104 = KP_8 KP_8 71 keycode 105 = KP_9 KP_9 72 keycode 106 = KP_Multiply KP_Multiply 73 keycode 107 = KP_Add KP_Add 74 keycode 108 = KP_Separator KP_Separator 75 keycode 109 = KP_Subtract KP_Subtract 76 keycode 110 = KP_Decimal KP_Decimal 77 keycode 111 = KP_Divide KP_Divide 78 keycode 112 = F1 79 keycode 113 = F2 80 keycode 114 = F3 81 keycode 115 = F4 82 keycode 116 = F5 83 keycode 117 = F6 84 keycode 118 = F7 85 keycode 119 = F8 86 keycode 120 = F9 87 keycode 121 = F10 88 keycode 122 = F11 89 keycode 123 = F12 90 keycode 124 = F13 91 keycode 125 = F14 92 keycode 126 = F15 93 keycode 127 = F16 94 keycode 128 = F17 95 keycode 129 = F18 96 keycode 130 = F19 97 keycode 131 = F20 98 keycode 132 = F21 99 keycode 133 = F22 100 keycode 134 = F23 101 keycode 135 = F24 102 keycode 136 = Num_Lock 103 keycode 137 = Scroll_Lock 104 keycode 187 = acute grave 105 keycode 188 = comma semicolon 106 keycode 189 = minus underscore 107 keycode 190 = period colon 108 keycode 192 = numbersign apostrophe 109 keycode 210 = plusminus hyphen macron 110 keycode 211 = 111 keycode 212 = copyright registered 112 keycode 213 = guillemotleft guillemotright 113 keycode 214 = masculine ordfeminine 114 keycode 215 = ae AE 115 keycode 216 = cent yen 116 keycode 217 = questiondown exclamdown 117 keycode 218 = onequarter onehalf threequarters 118 keycode 220 = less greater bar 119 keycode 221 = plus asterisk asciitilde 120 keycode 227 = multiply division 121 keycode 228 = acircumflex Acircumflex 122 keycode 229 = ecircumflex Ecircumflex 123 keycode 230 = icircumflex Icircumflex 124 keycode 231 = ocircumflex Ocircumflex 125 keycode 232 = ucircumflex Ucircumflex 126 keycode 233 = ntilde Ntilde 127 keycode 234 = yacute Yacute 128 keycode 235 = oslash Ooblique 129 keycode 236 = aring Aring 130 keycode 237 = ccedilla Ccedilla 131 keycode 238 = thorn THORN 132 keycode 239 = eth ETH 133 keycode 240 = diaeresis cedilla currency 134 keycode 241 = agrave Agrave atilde Atilde 135 keycode 242 = egrave Egrave 136 keycode 243 = igrave Igrave 137 keycode 244 = ograve Ograve otilde Otilde 138 keycode 245 = ugrave Ugrave 139 keycode 246 = adiaeresis Adiaeresis 140 keycode 247 = ediaeresis Ediaeresis 141 keycode 248 = idiaeresis Idiaeresis 142 keycode 249 = odiaeresis Odiaeresis 143 keycode 250 = udiaeresis Udiaeresis 144 keycode 251 = ssharp question backslash 145 keycode 252 = asciicircum degree 146 keycode 253 = 3 sterling 147 keycode 254 = Mode_switch