JS Implementation drag layer, compatible Iefirefox
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns= "http://www.w3.org/1999/xhtml"
<html>
<head>
<TITLE> JS Implementation drag layer, compatible Iefirefox </title>
<meta name= "generator" content= "EditPlus"
<meta name= "Author" content= ""
<meta name= " Keywords "content=" "
<meta name=" Description "content=" ""
< SCRIPT>&NBSP
var posx;
var posy;
var popdiv;
var dragable;
function Down (e) {
Popdiv = document.getElementById ("Pop-editor");
E = e | | window.event; If it is IE
Posx = E.clientx-parseint (popDiv.style.left);
Posy = E.clienty-parseint (popDiv.style.top);
Dragable = true;
Document.onmousemove = move;
}
function Move (EV) {
if (dragable = = True) {
EV = EV | | window.event;//if it's IE
PopDiv.style.left = (EV.CLIENTX-POSX) + "px";
PopDiv.style.top = (ev.clienty-posy) + "px";
}
}
function up () {
Dragable = false;
}
</script>
</HEAD>
<BODY>JS Implementation drag layer, compatible IEFIREFOXJS implementation drag layer, compatible IEFIREFOXJS implementation drag layer, compatible IEFIREFOXJS implementation drag layer, compatible IEFIREFOXJS implementation drag layer, Compatible IEFIREFOXJS implementation drag layer, compatible IEFIREFOXJS implementation drag layer, compatibility Iefirefox
<div id= ' pop-editor ' style= '; height:430px;border:1px solid Red;position:absolute;left:100px;top:100px;background-color:blue ' onmousedown= ' down (event) ' onmouseup= ' Up () '
&NBSP;&NBSP;ASDFDSF
</div>
</BODY>
< /html>