资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
有关div页面拖动、缩放、关闭、遮罩效果代码
<htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/> <title>UntitledDocument</title> <style><!-- #rRightDown,#rLeftDown,#rLeftUp,#rRightUp,#rRight,#rLeft,#rUp,#rDown{ position:absolute; background:#00F; width:3px; height:3px; z-index:6; font-size:0; } #rLeftDown,#rRightUp{cursor:ne-resize;} #rRightDown,#rLeftUp{cursor:nw-resize;} #rRight,#rLeft{cursor:e-resize;} #rUp,#rDown{cursor:n-resize;} #rLeftDown{left:-4px;bottom:-4px;} #rRightUp{right:-4px;top:-4px;} #rRightDown{right:-4px;bottom:-4px;background-color:#00F;} #rLeftUp{left:-4px;top:-4px;} #rRight{right:-4px;top:50%;margin-top:-4px;} #rLeft{left:-4px;top:50%;margin-top:-4px;} #rUp{top:-4px;left:50%;margin-left:-4px;} #rDown{bottom:-4px;left:50%;margin-left:-4px;} --></style><style bogus="1">#rRightDown,#rLeftDown,#rLeftUp,#rRightUp,#rRight,#rLeft,#rUp,#rDown{ position:absolute; background:#00F; width:3px; height:3px; z-index:6; font-size:0; } #rLeftDown,#rRightUp{cursor:ne-resize;} #rRightDown,#rLeftUp{cursor:nw-resize;} #rRight,#rLeft{cursor:e-resize;} #rUp,#rDown{cursor:n-resize;} #rLeftDown{left:-4px;bottom:-4px;} #rRightUp{right:-4px;top:-4px;} #rRightDown{right:-4px;bottom:-4px;background-color:#00F;} #rLeftUp{left:-4px;top:-4px;} #rRight{right:-4px;top:50%;margin-top:-4px;} #rLeft{left:-4px;top:50%;margin-top:-4px;} #rUp{top:-4px;left:50%;margin-left:-4px;} #rDown{bottom:-4px;left:50%;margin-left:-4px;}</style> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%3C!--%20%0D%0Afunction%20createIframe()%7B%20%0D%0A%0D%0A%2F%2Fmask%E9%81%AE%E7%BD%A9%E5%B1%82%20%0D%0Avar%20newMask%3Ddocument.createElement(%22div%22)%3B%20%0D%0A%0D%0AnewMask.id%3D%22mDiv%22%3B%20%0D%0AnewMask.style.position%3D%22absolute%22%3B%20%0D%0AnewMask.style.zIndex%3D%221%22%3B%20%0D%0A%0D%0A_scrollWidth%3DMath.max(document.body.scrollWidth%2Cdocument.documentElement.scrollWidth)%3B%20%0D%0A_scrollHeight%3DMath.max(document.body.scrollHeight%2Cdocument.documentElement.scrollHeight)%3B%20%0D%0A%0D%0AnewMask.style.width%3D_scrollWidth%2B%22px%22%3B%20%0D%0AnewMask.style.height%3D_scrollHeight%2B%22px%22%3B%20%0D%0A%0D%0AnewMask.style.top%3D%220px%22%3B%20%0D%0AnewMask.style.left%3D%220px%22%3B%20%0D%0A%0D%0AnewMask.style.background%20%3D%20%22%23FFFFFF%22%3B%20%0D%0AnewMask.style.filter%3D%22alpha(opacity%3D10)%22%3B%20%0D%0AnewMask.style.opacity%3D%220.10%22%3B%20%0D%0AnewMask.style.display%3D'none'%3B%20%0D%0A%0D%0A%2F%2F%20create%20div%20%0D%0Avar%20objDiv%3Ddocument.createElement(%22div%22)%3B%20%0D%0A%0D%0AobjDiv.id%3D%22div1%22%3B%20%0D%0AobjDiv.name%3D%22div1%22%3B%20%0D%0A%0D%0AobjDiv.style.width%3D%22480px%22%3B%20%0D%0AobjDiv.style.height%3D%22204px%22%3B%20%0D%0A%0D%0AobjDiv.style.left%3D(_scrollWidth-480)%2F2%2B%22px%22%3B%20%0D%0AobjDiv.style.top%3D(_scrollHeight-204)%2F2%2B%22px%22%3B%20%0D%0A%0D%0AobjDiv.style.position%3D%22absolute%22%3B%20%0D%0AobjDiv.style.zIndex%3D%222%22%3B%20%2F%2F%E5%8A%A0%E4%BA%86%E8%BF%99%E4%B8%AA%E8%AF%AD%E5%8F%A5%E8%AE%A9objDiv%E6%B5%AE%E5%9C%A8newMask%E4%B9%8B%E4%B8%8A%20%0D%0AobjDiv.style.display%3D%22none%22%3B%20%2F%2F%E8%AE%A9objDiv%E9%A2%84%E5%85%88%E9%9A%90%E8%97%8F%20%0D%0AobjDiv.style.backgroundColor%20%3D%20%22%2355A0FF%22%3B%20%0D%0A%0D%0A%2F%2F%E6%B7%BB%E5%8A%A0top%E4%B8%8A%E9%9D%A2%E5%86%85%E5%AE%B9%20%0D%0Avar%20str%20%3D%20%22%22%3B%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20style%20%3D%20%22position%3Aabsolute%3Bheight%3A20px%3Bz-index%3A3%3Btop%3A0%3Bfont%3A%E6%96%B0%E5%AE%8B%E4%BD%93%3B%20font-size%3A13pt%3Bcolor%3A%23FFFFFF%3B%22%3E%E6%9C%89%E5%85%B3DIV%20%E6%8B%96%E5%8A%A8%E3%80%81%E7%BC%A9%E6%94%BE%E3%80%81%E9%81%AE%E7%BD%A9%E6%95%88%E6%9E%9C%3C%2Fdiv%3E'%3B%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%20%3D%22drag%22%20style%20%3D%20%22position%3Aabsolute%3Bheight%3A20px%3Bwidth%3A100%25%3Bz-index%3A4%3Btop%3A0%3Bbackground-color%3A%23FFFFFF%3Bfilter%3Aalpha(opacity%3D10)%3Bopacity%3A0.10%3B%22%3E%3C%2Fdiv%3E'%3B%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cinput%20id%3D%22objClose%22%20style%20%3D%20%22position%3Aabsolute%3Bheight%3A20px%3Bwidth%3A20px%3Bz-index%3A5%3Btop%3A0%3Bfont-size%3A13pt%3Bright%3A0%3Bborder%3Asolid%20%23FFFFFF%201px%3B%20background-color%3A%23FF0000%3Bcolor%3A%23FFFFFF%3B%22%20type%20%3D%20%22button%22%20value%3D%22X%22%20onclick%20%3D%20%22HideIframe(document.getElementById(%5C'mDiv%5C')%2Cdocument.getElementById(%5C'div1%5C'))%3B%22%20onmouseover%3D%22handleOver()%22%20onmouseout%3D%22handleOut()%22%2F%3E'%3B%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rLeftDown%22%20onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C6)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%B7%A6%E4%B8%8B%E8%A7%92div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rRightUp%22onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C2)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%8F%B3%E4%B8%8A%E8%A7%92div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rRightDown%22%20onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C4)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%8F%B3%E4%B8%8B%E8%A7%92div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rLeftUp%22%20onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C0)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%B7%A6%E4%B8%8A%E8%A7%92div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rRight%22%20onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C3)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%8F%B3%E8%BE%B9div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rLeft%22%20onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C7)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E5%B7%A6%E8%BE%B9div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rUp%22onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C1)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E4%B8%8A%E8%BE%B9div%20%0D%0Astr%20%3D%20str%20%2B%20'%3Cdiv%20id%3D%22rDown%22onmousedown%3D%22moveStart(this)%3B%22%20onmousemove%3D%22moving(this%2C5)%3B%22onmouseup%3D%22moveEnd(this)%3B%22%20%3E%3C%2Fdiv%3E'%3B%2F%2F%E4%B8%8B%E8%BE%B9div%20%0D%0A%0D%0AobjDiv.innerHTML%20%3D%20str%3B%20%0D%0A%0D%0A%2F%2F%E6%B7%BB%E5%8A%A0%E8%BE%B9%E6%A1%86%E6%A0%B7%E5%BC%8F%20%0D%0AobjDiv.style.border%3D%22solid%20%230033FF%203px%3B%22%3B%20%0D%0AobjDiv.style.borderTop%20%3D%20%222px%20solid%20%2355A0FF%22%3B%20%0D%0AobjDiv.style.borderLeft%20%3D%20%222px%20solid%20%2355A0FF%22%3B%20%0D%0AobjDiv.style.borderRight%20%3D%20%222px%20solid%20%2355A0FF%22%3B%20%0D%0AobjDiv.style.borderBottom%20%3D%20%222px%20solid%20%2355A0FF%22%3B%20%0D%0A%0D%0A%2F%2Fcreate%20iframe%20%0D%0Avar%20frm%3Ddocument.createElement(%22iframe%22)%3B%20%0D%0Afrm.id%3D%22ifrm%22%3B%20%0D%0Afrm.name%3D%22ifrm%22%3B%20%0D%0Afrm.style.position%3D%22absolute%22%3B%20%0D%0Afrm.style.width%3D%22100%25%22%3B%20%0D%0Afrm.style.height%3D180%3B%20%0D%0Afrm.style.top%3D20%3B%20%0D%0Afrm.style.display%3D''%3B%20%0D%0Afrm.frameborder%3D0%3B%20%0D%0AobjDiv.appendChild(frm)%3B%20%0D%0A%0D%0Adocument.body.appendChild(newMask)%3B%20%0D%0Adocument.body.appendChild(objDiv)%3B%20%0D%0A%0D%0A%2F%2F%E5%AE%9E%E7%8E%B0%E6%8B%96%E5%8A%A8%E6%95%88%E6%9E%9C%20%0D%0Avar%20objDrag%3Ddocument.getElementById(%22drag%22)%3B%20%0D%0Avar%20drag%3Dfalse%3B%20%0D%0Avar%20dragX%3D0%3B%20%0D%0Avar%20dragY%3D0%3B%20%0D%0A%0D%0AobjDrag.attachEvent(%22onmousedown%22%2CstartDrag)%3B%20%0D%0Afunction%20startDrag()%7B%20%0D%0Aif(event.button%20%3D%3D%201%20%26%26%20event.srcElement.tagName.toUpperCase()%20%3D%3D%20%22DIV%22)%7B%20%0D%0AobjDrag.setCapture()%3B%20%0D%0AobjDrag.style.cursor%20%3D%20%22move%22%3B%20%0D%0AobjDrag.style.zIndex%20%3D%20%221001%22%3B%20%0D%0A%0D%0Adrag%20%3D%20true%3B%20%0D%0AdragX%20%3D%20event.clientX%3B%20%0D%0AdragY%20%3D%20event.clientY%3B%20%0D%0A%0D%0Aevent.cancelBubble%3Dtrue%3B%20%0D%0Aevent.returnValue%3Dfalse%3B%20%0D%0A%7D%20%0D%0A%7D%3B%20%0D%0A%0D%0AobjDrag.attachEvent(%22onmousemove%22%2CDrag)%3B%20%0D%0Afunction%20Drag()%7B%20%0D%0Aif(drag)%7B%20%0D%0Avar%20oldwin%20%3D%20objDrag.parentNode%3B%20%0D%0Aoldwin.style.left%20%3D%20oldwin.offsetLeft%20%2B%20event.clientX%20-%20dragX%3B%20%0D%0Aoldwin.style.top%20%3D%20oldwin.offsetTop%20%2B%20event.clientY%20-%20dragY%3B%20%0D%0A%0D%0AdragX%20%3D%20event.clientX%3B%20%0D%0AdragY%20%3D%20event.clientY%3B%20%0D%0A%7D%20%0D%0A%7D%3B%20%0D%0A%0D%0AobjDrag.attachEvent(%22onmouseup%22%2CstopDrag)%3B%20%0D%0Afunction%20stopDrag()%7B%20%0D%0AobjDrag.style.zIndex%20%3D%20%224%22%3B%20%0D%0AobjDrag.style.cursor%20%3D%20%22default%22%3B%20%0D%0A%0D%0AobjDrag.releaseCapture()%3B%20%0D%0Adrag%3Dfalse%3B%20%0D%0A%7D%3B%20%0D%0A%0D%0A%7D%20%0D%0A%2F%2F%E5%85%B3%E9%97%AD%E6%8C%89%E9%92%AE%E6%A0%B7%E5%BC%8F%20%0D%0Afunction%20handleOut()%7B%20%0D%0Avar%20objButton%20%3D%20document.getElementById(%22objClose%22)%3B%20%0D%0AobjButton.style.backgroundColor%20%3D%20%22%23FF0000%22%3B%20%0D%0AobjButton.style.zIndex%20%3D%20%225%22%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20handleOver()%7B%20%0D%0Avar%20objButton%20%3D%20document.getElementById(%22objClose%22)%3B%20%0D%0AobjButton.style.backgroundColor%20%3D%20%22%23FF8080%22%3B%20%0D%0AobjButton.style.zIndex%20%3D%20%221001%22%3B%20%0D%0A%7D%20%0D%0A%2F%2F%E6%B7%BB%E5%8A%A0iframe%E5%86%85%E5%AE%B9%20%0D%0Afunction%20htmlEditor()%7B%20%0D%0Avar%20frm%3Ddocument.getElementById(%22ifrm%22)%3B%20%0D%0Avar%20objDiv%3Ddocument.getElementById(%22div1%22)%3B%20%0D%0Avar%20mDiv%3Ddocument.getElementById(%22mDiv%22)%3B%20%0D%0A%0D%0AmDiv.style.display%3D''%3B%20%0D%0Avar%20iframeTextContent%3D''%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C!DOCTYPE%20HTML%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20HTML%204.0%20Transitional%2F%2FEN%22%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Chead%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Cmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dgb2312%22%20%2F%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Fhead%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Cbody%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctable%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctd%3EName%20%3C%2Ftd%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctd%3E%20%3Cinput%20type%3D%22text%22%20value%3D%22%22%20%2F%3E%20%3C%2Ftd%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Ftr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctd%3EEmail%20%3C%2Ftd%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctd%3E%20%3Cinput%20type%3D%22text%22%20value%3D%22%22%20%2F%3E%20%3C%2Ftd%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Ftr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3Ctd%3E%20%3Cinput%20type%3D%22button%22%20id%3D%22btGo%22%20value%3D%22Go%22%20%2F%3E%20%3C%2Ftd%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Ftr%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Ftable%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Fbody%3E'%3B%20%0D%0AiframeTextContent%2B%3D'%20%3C%2Fhtml%3E'%3B%20%0D%0Afrm.contentWindow.document.designMode%3D'off'%3B%20%0D%0Afrm.contentWindow.document.open()%3B%20%0D%0Afrm.contentWindow.document.write(iframeTextContent)%3B%20%0D%0Afrm.contentWindow.document.close()%3B%20%0D%0AobjDiv.style.display%20%3D%20%22%22%3B%20%2F%2F%E6%98%BE%E7%A4%BA%E6%B5%AE%E5%8A%A8%E7%9A%84div%20%0D%0A%0D%0A%2F%2F%E7%82%B9%E5%87%BBgo%E6%8C%89%E9%92%AE%E5%85%B3%E9%97%AD%E9%A1%B5%E9%9D%A2%20%0D%0Avar%20objGo%3Dfrm.contentWindow.document.getElementById(%22btGo%22)%3B%20%0D%0AobjGo.attachEvent(%22onclick%22%2Cfunction%20()%7BHideIframe(mDiv%2CobjDiv)%3B%7D)%3B%20%0D%0A%7D%20%0D%0A%0D%0A%2F%2F%E5%85%B3%E9%97%AD%E9%A1%B5%E9%9D%A2%20%0D%0Afunction%20HideIframe(mDiv%2CobjDiv)%7B%20%0D%0A%0D%0AmDiv.style.display%3D'none'%3B%20%0D%0AobjDiv.style.display%20%3D%20%22none%22%3B%20%2F%2F%E9%9A%90%E8%97%8F%E6%B5%AE%E5%8A%A8%E7%9A%84div%20%0D%0A%7D%20%0D%0A%0D%0A%2F%2F%E5%AE%9E%E7%8E%B0%E7%BC%A9%E6%94%BE%E6%95%88%E6%9E%9C%20%0D%0Avar%20down%20%3D%200%3B%20%0D%0Afunction%20moveStart(obj)%7B%20%0D%0Avar%20objDiv%20%3D%20obj.parentNode%3B%20%0D%0Aobj.setCapture()%3B%20%0D%0Aobj.style.zIndex%20%3D%20%221001%22%3B%20%0D%0Adown%20%3D%201%3B%20%0D%0A%0D%0A_styleWidth%20%3D%20objDiv.clientWidth%3B%20%0D%0A_styleHeight%20%3D%20objDiv.clientHeight%3B%20%0D%0A_styleLeft%20%3D%20objDiv.offsetLeft%3B%20%0D%0A_styleTop%20%3D%20objDiv.offsetTop%3B%20%0D%0A%0D%0A_sideLeft%20%3D%20event.clientX%20-%20_styleWidth%3B%20%0D%0A_sideRight%20%3D%20event.clientX%20%2B%20_styleWidth%3B%20%0D%0A_sideUp%20%3D%20event.clientY%20-%20_styleHeight%3B%20%0D%0A_sideDown%20%3D%20event.clientY%20%2B%20_styleHeight%3B%20%0D%0A%0D%0A_fixLeft%20%3D%20_styleWidth%20%2B%20_styleLeft%3B%20%0D%0A_fixTop%20%3D%20_styleHeight%20%2B%20_styleTop%3B%20%0D%0A%0D%0Aevent.cancelBubble%20%3D%20true%3B%20%0D%0Aevent.returnValue%20%3D%20false%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20moving(obj%2Cnum)%7B%20%0D%0Aif(down)%7B%20%0D%0Avar%20objDiv%20%3D%20obj.parentNode%3B%20%0D%0Avar%20frm%20%3D%20document.getElementById(%22ifrm%22)%3B%20%0D%0Aswitch(num)%7B%20%0D%0A%2F%2F%E5%B7%A6%E4%B8%8A%E8%A7%92%20%0D%0Acase%200%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20_sideRight%20-%20event.clientX%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0AobjDiv.style.left%20%3D%20_fixLeft%20-%20_styleWidth%3B%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20_sideDown%20-%20event.clientY%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0AobjDiv.style.top%20%3D%20_fixTop%20-%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E4%B8%8A%E8%BE%B9%20%0D%0Acase%201%3A%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20_sideDown%20-%20event.clientY%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0AobjDiv.style.top%20%3D%20_fixTop%20-%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E5%8F%B3%E4%B8%8A%E8%A7%92%20%0D%0Acase%202%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20event.clientX%20-%20_sideLeft%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20_sideDown%20-%20event.clientY%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0AobjDiv.style.top%20%3D%20_fixTop%20-%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E5%8F%B3%E8%BE%B9%20%0D%0Acase%203%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20event.clientX%20-%20_sideLeft%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E5%8F%B3%E4%B8%8B%E8%A7%92%20%0D%0Acase%204%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20event.clientX%20-%20_sideLeft%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20event.clientY%20-%20_sideUp%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E4%B8%8B%E8%BE%B9%20%0D%0Acase%205%3A%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20event.clientY%20-%20_sideUp%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E5%B7%A6%E4%B8%8B%E8%A7%92%20%0D%0Acase%206%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20_sideRight%20-%20event.clientX%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0AobjDiv.style.left%20%3D%20_fixLeft%20-%20_styleWidth%3B%20%0D%0A_styleHeight%20%3D%20Math.max(yy%20%3D%20event.clientY%20-%20_sideUp%2C0)%3B%20%0D%0AobjDiv.style.height%20%3D%20_styleHeight%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0Afrm.style.height%20%3D%20(yy%20-%2024)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%0D%0A%2F%2F%E5%B7%A6%E8%BE%B9%20%0D%0Acase%207%3A%20%0D%0A_styleWidth%20%3D%20Math.max(xx%20%3D%20_sideRight%20-%20event.clientX%2C0)%3B%20%0D%0AobjDiv.style.width%20%3D%20_styleWidth%3B%20%0D%0AobjDiv.style.left%20%3D%20_fixLeft%20-%20_styleWidth%3B%20%0D%0Atry%7B%20%0D%0Afrm.style.width%20%3D%20(xx%20-%204)%20%2B%20%22px%22%3B%20%0D%0A%7Dcatch(e)%7B%7D%20%0D%0Abreak%3B%20%0D%0A%7D%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20moveEnd(obj)%7B%20%0D%0Adown%20%3D%200%3B%20%0D%0Aobj.style.cursor%20%3D%20%22default%22%3B%20%0D%0Aobj.style.zIndex%20%3D%20%226%22%3B%20%0D%0Aobj.releaseCapture()%3B%20%0D%0A%7D%3B%20%0D%0A%2F%2F%20--%3E%3C%2Fscript%3E"> </head> <body onLoad="createIframe()"> <table> <tr> <td>aa</td> <td><input type="text"/></td> </tr> <tr> <td>bb</td> <td><input type="text"/></td> </tr> </table> <input type="button"id="tt"name="tt"value="Click"onClick="htmlEditor()"/> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程