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

📄 dragdrop.js

📁 小型简单的旅馆预订系统. 客户:预定,更改,撤销,会员积分累积,查询预定,会员. 后台:会员更改,房间更改,预定更改,预定信息统计.
💻 JS
字号:
/*
   Milonic DHTML Menu - Drag & Drop Module dragdrop.js version 1.5 - August 31 2007
   This module is only compatible with the Milonic DHTML Menu version 5.780 or higher

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

// This module does not contain any user definable parameters.
// In order to enable menus as dragable, the menu must be alwaysvisible
// and the menu item initiating drag/drop must have the property type=dragable; declared

resetFollowScrollers=true; // If you want the menu to remain in the position dragged to for $X menus, set resetFollowScrollers to false

DragLayer=-1;
DragX=0;
DragY=0

function drag_drop(m,item)
{
	DragLayer=m;
	_gm=$c("menu"+DragLayer);
	if(ns4)_gm.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
	$c("el"+_itemRef).onmousedown=_DDgo;
	$c("el"+_itemRef).onmouseup=_DDstop;
}

function _DDgo()
{
	var t=$h("M_toolTips")	
	if(t)
	{
		$Y(t,0);
		clearTimeout(_Mtip)
		_Mtip=null
	}
	_gm=$c("menu"+DragLayer);
	_m[DragLayer].ifr=DragLayer
	gp=$D(_gm);
	DragY=Y_-gp[0];
	DragX=X_-gp[1];
	inDragMode=1;
}

function _DDstop()
{
	_gm=$c("menu"+DragLayer);
	_gm.style.zIndex=_zi;
	if(!resetFollowScrollers&&_m[DragLayer][19])_m[DragLayer][19]=Y_-_sT-(gp[2]/2)
	inDragMode=0;
}

function _IdM()
{
	if(inDragMode)
	{
		var g=$c($O+DragLayer);
		$E(g,Y_-DragY,X_-DragX);
		if(ie55){
			g=$c("iFM"+_m[DragLayer].ifr);
			if(g)$E(g,Y_-DragY,X_-DragX)
		}
		return 0;
	}	
}

⌨️ 快捷键说明

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