日期:2014-05-18 浏览次数:20856 次
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script type="text/javascript" language="javascript"> var popup_dragging = false; var popup_target; var popup_mouseX; var popup_mouseY; var popup_mouseposX; var popup_mouseposY; var popup_oldfunction; function popup_display(x) { var win = window.open(); for (var i in x) win.document.write(i + ' = ' + x[i] + '<br>'); } // ----- popup_mousedown ------------------------------------------------------- function popup_mousedown(e) { var ie = navigator.appName == "Microsoft Internet Explorer"; if (ie && window.event.button != 1) return; if (!ie && e.button != 0) return; popup_dragging = true; popup_target = this['target']; popup_mouseX = ie ? window.event.clientX : e.clientX; popup_mouseY = ie ? window.event.clientY : e.clientY; if (ie) popup_oldfunction = document.onselectstart; else popup_oldfunction = document.onmousedown; if (ie) document.onselectstart = new Function("return false;"); else document.onmousedown = new Function("return false;"); } // ----- popup_mousemove ------------------------------------------------------- function popup_mousemove(e) { if (!popup_dragging) return; var ie = navigator.appName == "Microsoft Internet Explorer"; var element = document.getElementById(popup_target); var mouseX = ie ? window.event.clientX : e.clientX; var mouseY = ie ? window.event.clientY : e.clientY; element.style.left = (element.offsetLeft + mouseX - popup_mouseX) + 'px'; element.style.top = (element.offsetTop + mouseY - popup_mouseY) + 'px'; popup_mouseX = ie ? window.event.clientX : e.clientX; popup_mouseY = ie ? window.event.clientY : e.clientY; } // ----- popup_mouseup --------------------- function popup_mouseup(e) { if (!popup_dragging) return; popup_dragging = false; var ie = navigator.appName == "Microsoft Internet Explorer"; var element = document.getElementById(popup_target); if (ie) document.onselectstart = popup_oldfunction; else document.onmousedown = popup_oldfunction; } // ----- popup_exit ------------------------ function popup_exit(e) { if (document.getElementById('<%=hid.ClientID %>').value) { document.getElementById('<%=hid.ClientID %>').value = 'false'; element = document.getElementById('popup'); element.style.visibility = "hidden"; element.style.display = "none"; return; } var ie = navigator.appName == "Microsoft Internet Explorer";