<div class="codetitle"> <span><a style="CURSOR: pointer" data="88140" class="copybut" id="copybut88140" onclick="doCopy('code88140')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code88140"> <br> <br> <br> <br> <br><title>WebForm4</title> <br><meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"> <br><meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1"> <br><meta name="vs_defaultClientScript" content="JavaScript"> <br><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <br><style type="text/css"> <BR>.resizeDivClass{ <BR>width:3px; <BR>margin:0px 0 0px 0; <BR>background:#ffff33; <BR>border:5px; <BR>cursor:e-resize; <BR></style> <br><script type="text/javascript" language="javascript"> <BR>var mousedown=false; <BR>var aaa; <BR>function down() { <BR>mousedown=true; <BR>aaa=event.clientX-td1.offsetWidth; <BR>event.srcElement.setCapture(); <BR>} <BR>function move() { <BR>if(mousedown==true){ <BR>td1.style.width=Math.max(1,event.clientX-aaa); <BR>} <BR>} <BR>function up() { <BR>event.srcElement.releaseCapture(); <BR>mousedown=false; <BR>} <BR></script> <br> <br> <br><table width="100%" height="100%"> <br><tr> <br><td id="td1"> <br>第一个iframe <br><iframe style="WIDTH: 100%; HEIGHT: 100%" src="" frameborder="0"> <br></iframe> <br> </td> <br><td class="resizeDivClass" onmousedown="down()" onmousemove="move()" onmouseup="up()"> <br> </td> <br><td> <br>第二个iframe <br><iframe style="WIDTH: 100%; HEIGHT: 100%" src="" frameborder="0"> <br></iframe> <br> </td> <br> <br> </tr> </table> <br> <br> <br> </div> <br><img src="http://files.jb51.net/file_images/article/201304/2013416154655696.jpg?2013316154735" alt="主页面中的两个iframe实现鼠标拖动改变其大小_javascript技巧" >