⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tooltips.js

📁 小型简单的旅馆预订系统. 客户:预定,更改,撤销,会员积分累积,查询预定,会员. 后台:会员更改,房间更改,预定更改,预定信息统计.
💻 JS
字号:
/*
   Milonic DHTML Menu - Tool Tips Module  tooltips.js version 2.7 - June 26 2007
   This module is only compatible with the Milonic DHTML Menu version 5.472 or higher

   Copyright 2005 (c) Milonic Solutions Limited. All Rights Reserved.
   This is a commercial software product, please visit http://www.milonic.com/ for more information.
*/

M_ToolTipDelay=500    // Milliseconds after menu has been displayed before showing tooltip
//M_maxTipWidth=100     // Sets the maximum width, remove for 100%

// The above 2 parameters are the only user definable parameters for this module.
// In order to use this module you will also need the Milonic DHTML Menu code files 
// The syntax for tooltips in a menuitem is : tooltip=I Am A Tooltip;

// The syntax for HTML object is: showtip("This is your text <b><i>With HTML </i></b> too!")
// Don't forget to use the hidetip() function onmouseout to stop the tip from showing after your have moved away from the HTML object

_tos=_los=_TtSo=_tipFoll=_TTD=0

with(M_toolTipStyle=new mm_style()){
    offbgcolor = "#FFFFE1";
      offcolor = "#000000";
   bordercolor = "#999999";
   borderstyle = "solid";
       padding = 1
   borderwidth = 1
      fontsize = "10px";
     fontstyle = "normal";
    fontfamily = "tahoma, verdana";
    overfilter = "Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
}
with(new menuname("M_toolTips"))
{
	top="offset=18"
	left="offset=10"
	style=M_toolTipStyle;
	margin=4
	if(_W.M_maxTipWidth)maxwidth=M_maxTipWidth
	aI("text=;type=ToolTip;");
}
drawMenus()

function _gTOb(m){
	t_M=$h(m)
	_Tgm=$c("menu"+t_M)}

_gTOb("M_toolTips")
_TipIF=$mD
function buildTips(t)
{
	if(!_m[t_M][23]&&!_startM){
		_m[t_M][23]=1
		g$(t_M)	
	}
	_m[t_M].tooltip=1
	_el=_m[t_M][0][0]
	if($tL(_Tgm.style.visibility)==$6)return
	_mi[_el][1]=t
	//_cMT=$P(_cMT);
	_Tgm.innerHTML=o$(t_M)
	_mcnt--
	_i=_itemRef
	$z(t_M)
	popup(_m[t_M][1],1);
	_TipIF=$mD
	_itemRef=_i
	_p2(t_M)
	j_=$D(_gm)
	if((j_[0]+j_[2])>_bH)$E(_gm,Y_-j_[2])
	_Tgm.style.zIndex=_zi+100	
	_TtSo=0
}

function hidetip(){	
	_TtSo=0
	_Gtt=""
	_Mtip=$P(_Mtip);
	$Y(t_M,0)
	_tipFoll=0
	_TTD=M_ToolTipDelay
	_gTOb("M_toolTips")
}
	
hidetip();

function showtip(){
	_Mtip=$P(_Mtip);
	_Tgm.style.visibility="hidden"
	_Tgm.style.zIndex=10000
	var a=arguments,t;
	if(!op5||!op6||!ns4)
	if(a[0]||_W._Gtt){
		if(_W._Gtt)t=_Gtt; else t=a[0];
		_Gtt=t
		if(a[1])_tipFoll=1 // Toggle for whether tooltips follows mouse movement
		if(a[2])_TTD=a[2] // Tooltip delay in milliseconds
		if(a[3])_gTOb(a[3]); // tipmenu
	}
	else{
		if(_itemRef==-1)return
		t=_mi[_itemRef][95]
		if(_mi[_itemRef][98])_TTD=_mi[_itemRef][98]
		if(_mi[_itemRef][100])_gTOb(_mi[_itemRef][100]);
		
	}
	if(t==""||t==_n)return	
	if(!inDragMode)_Mtip=setTimeout("buildTips(\""+t+"\")",_TTD)
	_TtSo=1
}

function _TtM(){
	if(_TtSo)showtip()
	if(_tipFoll==1||(_trueItemRef>-1&&_mi[_trueItemRef][99])){
		_TY=Y_+_tos
		_TX=X_+_los
		$E(_Tgm,_TY,_TX)
		_a9=$c("iF"+_TipIF)
		if(_a9)$E(_a9,_TY,_TX)
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -