📄 wz_tooltip.js
字号:
t_tj.onmouseover = new Function('e', 'tt_Show(e,'+ '"tOoLtIp' +i+''+j+ '",'+ (typeof t_tj.T_ABOVE != tt_u) + ','+ ((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay) + ','+ ((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""') + ','+ (typeof t_tj.T_LEFT != tt_u) + ','+ ((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX) + ','+ ((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY) + ','+ (typeof t_tj.T_STATIC != tt_u) + ','+ (typeof t_tj.T_STICKY != tt_u) + ','+ ((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+ ');' ); t_tj.onmouseout = tt_Hide; if (t_tj.alt) t_tj.alt = ""; if (t_tj.title) t_tj.title = ""; } } } document.write(htm);}function tt_EvX(t_e){ var t_y = tt_Int(t_e.pageX || t_e.clientX || 0) + tt_Int(tt_ie? tt_db.scrollLeft : 0) + tt_offX; if (t_y > xlim) t_y = xlim; var t_scr = tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0); if (t_y < t_scr) t_y = t_scr; return t_y;}function tt_EvY(t_e){ var t_y = tt_Int(t_e.pageY || t_e.clientY || 0) + tt_Int(tt_ie? tt_db.scrollTop : 0); if (tt_above) t_y -= (tt_objH + tt_offY - (tt_op? 31 : 15)); else if (t_y > ylim || !tt_dwn && t_y > ylim-24) { t_y -= (tt_objH + 5); tt_dwn = false; } else { t_y += tt_offY; tt_dwn = true; } return t_y;}function tt_ReleasMov(){ if (document.onmousemove == tt_Move) { if (document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE); document.onmousemove = null; }}function tt_HideInput(){ if (!(tt_ie || tt_op6) || !tt_inputs) return; var t_o; var t_i = tt_inputs.length; while (t_i--) { t_o = tt_inputs[t_i]; if (tt_vis && tt_objX+tt_objW > t_o.x && tt_objX < t_o.x+t_o.offsetWidth && tt_objY+tt_objH > t_o.y && tt_objY < t_o.y+t_o.offsetHeight) t_o.style.visibility = 'hidden'; else t_o.style.visibility = 'visible'; }}function tt_GetDiv(t_id){ return ( tt_n4? (document.layers[t_id] || null) : tt_ie? (document.all[t_id] || null) : (document.getElementById(t_id) || null) );}function tt_GetDivW(){ return tt_Int( tt_n4? tt_obj.clip.width : tt_obj.style.pixelWidth? tt_obj.style.pixelWidth : tt_obj.offsetWidth );}function tt_GetDivH(){ return tt_Int( tt_n4? tt_obj.clip.height : tt_obj.style.pixelHeight? tt_obj.style.pixelHeight : tt_obj.offsetHeight );}// Compat with DragDrop Lib: Ensure that z-index of tooltip is lifted beyond toplevel dragdrop elementfunction tt_SetDivZ(){ var t_i = tt_obj.style || tt_obj; if (window.dd && dd.z) t_i.zIndex = Math.max(dd.z+1, t_i.zIndex);}function tt_SetDivPos(t_x, t_y){ var t_i = tt_obj.style || tt_obj; var t_px = (tt_op6 || tt_n4)? '' : 'px'; t_i.left = (tt_objX = t_x) + t_px; t_i.top = (tt_objY = t_y) + t_px; tt_HideInput();}function tt_ShowDiv(t_x){ if (tt_n4) tt_obj.visibility = t_x? 'show' : 'hide'; else tt_obj.style.visibility = t_x? 'visible' : 'hidden'; tt_vis = t_x; tt_HideInput();}function tt_Show(t_e, t_id, t_above, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky, t_temp){ if (tt_obj) tt_Hide(); var t_mf = document.onmousemove || null; if (window.dd && (window.DRAG && t_mf == DRAG || window.RESIZE && t_mf == RESIZE)) return; var t_uf = document.onmouseup || null; if (t_mf && t_uf) t_uf(t_e); tt_obj = tt_GetDiv(t_id); if (tt_obj) { tt_dwn = !(tt_above = t_above); tt_sticky = t_sticky; tt_objW = tt_GetDivW(); tt_objH = tt_GetDivH(); tt_offX = t_left? -(tt_objW+t_offx) : t_offx; tt_offY = t_offy; if (tt_op) tt_offY += 21; if (tt_n4) { if (tt_obj.document.layers.length) { var t_sh = tt_obj.document.layers[0]; t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3); } } else { var t_sh = tt_GetDiv(t_id+'R'); if (t_sh) { var t_h = tt_objH - tt_Int(t_sh.style.pixelTop || t_sh.style.top || 0); if (typeof t_sh.style.pixelHeight != tt_u) t_sh.style.pixelHeight = t_h; else t_sh.style.height = t_h + 'px'; } } tt_GetSelects(); xlim = tt_Int((tt_db && tt_db.clientWidth)? tt_db.clientWidth : window.innerWidth) + tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0) - tt_objW - (tt_n4? 21 : 0); ylim = tt_Int(window.innerHeight || tt_db.clientHeight) + tt_Int(window.pageYOffset || (tt_db? tt_db.scrollTop : 0) || 0) - tt_objH - tt_offY; tt_SetDivZ(); t_e = t_e || window.event; if (t_fix) tt_SetDivPos(tt_Int((t_fix = t_fix.split(','))[0]), tt_Int(t_fix[1])); else tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e)); var t_txt = 'tt_ShowDiv(\'true\');'; if (t_sticky) t_txt += '{'+ 'tt_ReleasMov();'+ 'window.tt_upFunc = document.onmouseup || null;'+ 'if (document.captureEvents) document.captureEvents(Event.MOUSEUP);'+ 'document.onmouseup = new Function("window.setTimeout(\'tt_Hide();\', 10);");'+ '}'; else if (t_static) t_txt += 'tt_ReleasMov();'; if (t_temp > 0) t_txt += 'window.tt_rtm = window.setTimeout(\'tt_sticky = false; tt_Hide();\','+t_temp+');'; window.tt_rdl = window.setTimeout(t_txt, t_delay); if (!t_fix) { if (document.captureEvents) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = tt_Move; } }}var tt_area = false;function tt_Move(t_ev){ if (!tt_obj) return; if (tt_n6 || tt_w3c) { if (tt_wait) return; tt_wait = true; setTimeout('tt_wait = false;', 5); } var t_e = t_ev || window.event; tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e)); if (tt_op6) { if (tt_area && t_e.target.tagName != 'AREA') tt_Hide(); else if (t_e.target.tagName == 'AREA') tt_area = true; }}function tt_Hide(){ if (window.tt_obj) { if (window.tt_rdl) window.clearTimeout(tt_rdl); if (!tt_sticky || tt_sticky && !tt_vis) { if (window.tt_rtm) window.clearTimeout(tt_rtm); tt_ShowDiv(false); tt_SetDivPos(-tt_objW, -tt_objH); tt_obj = null; if (typeof window.tt_upFunc != tt_u) document.onmouseup = window.tt_upFunc; } tt_sticky = false; if (tt_op6 && tt_area) tt_area = false; tt_ReleasMov(); tt_HideInput(); }}tt_Init();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -