Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
genericMove.js
Package: 图书管理系统.rar [view]
Upload User: llrg7406
Upload Date: 2007-03-02
Package Size: 654k
Code Size: 2k
Category:
Education soft system
Development Platform:
Delphi
- var dragobject = null;
- var tx;
- var ty;
- function getReal(el) {
- temp = el;
- while ((temp != null) && (temp.tagName != "BODY")) {
- if ((temp.className == "moveme") || (temp.className == "handle")){
- el = temp;
- return el;
- }
- temp = temp.parentElement;
- }
- return el;
- }
- function moveme_onmousedown() {
- el = getReal(window.event.srcElement)
- if (el.className == "moveme") {
- dragobject = el;
- ty = (window.event.clientY - dragobject.style.pixelTop);
- tx = (window.event.clientX - dragobject.style.pixelLeft);
- window.event.returnValue = false;
- window.event.cancelBubble = true;
- }
- else if (el.className == "handle") {
- tmp = el.getAttribute("for");
- if (tmp != null) {
- el = eval(tmp);
- dragobject = el;
- ty = (window.event.clientY - dragobject.style.pixelTop);
- tx = (window.event.clientX - dragobject.style.pixelLeft);
- window.event.returnValue = false;
- window.event.cancelBubble = true;
- }
- else {
- dragobject = null;
- }
- }
- else {
- dragobject = null;
- }
- }
- function moveme_onmouseup() {
- if(dragobject) {
- dragobject = null;
- }
- }
- function moveme_onmousemove() {
- if (dragobject) {
- if(window.event.clientX >= 0) {
- dragobject.style.left = window.event.clientX - tx;
- dragobject.style.top = window.event.clientY - ty;
- }
- window.event.returnValue = false;
- window.event.cancelBubble = true;
- }
- }
- if (document.all) { //This only works in IE4 or better
- document.onmousedown = moveme_onmousedown;
- document.onmouseup = moveme_onmouseup;
- document.onmousemove = moveme_onmousemove;
- }
- document.write("<style>");
- document.write(".moveme {cursor: move;}");
- document.write(".handle {cursor: move;}");
- document.write("</style>");