Fires when the user finishes changing the dimensions of the object in a control selection.Only content editable objects can be included in a control selection. You can make objects content editable by setting the contentEditable property to true or by placing the parent document in design mode.<body>
<div contentEditable>
<img src='1.jpg' width='150px' height='200px' onresizeend='alert(this.currentStyle.width)'>
</div>
</body>拖动1.jpg增加一定的宽度,然后弹出新宽度信息

解决方案 »

  1.   

    把frame指向的文件的body添加contentEditable属性
    或者:
    <script>
    document.body.contentEditable=true;
    </script>
      

  2.   

    body有这个属性么?我试了一下好像没有啊?
      

  3.   

    我的页面有三个frame构成
    我在最右边的那个frame的onsize事件中改变三个fram的宽度,这样就能实现鼠标改变页面布局了
    <frameset id="a" cols="200,10,*"onload="javascript:Load(this)">
    <frame name="left" src="menu.aspx" frameBorder="no">
    <frame  name="button" src="button.htm" frameBorder="no"   scrolling="no">
    <frame name="right" id="workframe" src="workframe.aspx"  frameborder="no"  onresize="javascript:Resize(this);">
    </frameset>function Resize(obj)
    {
    //obj.parentElement.childNodes(0).setAttribute("width", obj.offsetLeft-25);

    var leftLen;
    var rightLen;
    var sCols;

    leftLen   = document.body.clientWidth - obj.width -10;

    //obj.parentElement.cols = sCols;
    //rightLen = document.body.clientWidth - leftLen -10;

    sCols = leftLen + "," + 10 + "," + obj.width;
    if(obj.width < 600) 
    {
    rightLen = 600;
    obj.parentElement.cols= "200,10," + rightLen;
    }
    alert(sCols);
    if (iCount < 10)
    obj.parentElement.cols = sCols;

    //rightLen = obj.parentElement.width-obj.offsetLeft;
    //leftLen = obj.offsetLeft-25;
    //sCols = leftLen+""+",25," + rightLen + "";

    //alert(obj.parentElement.cols);//left.width = 
    //alert(sCols);
    }
      

  4.   

    问题是onsize不停的触发哈
    只要一拖动
    右边那个fram的边界,右边那个frame就没有了!
    onsizeend事件又没有,所以不能实现我想要的功能
      

  5.   

    <frameset>不与<body>共存可以通过frame中的onresizeend事件改变frameset中各frame的宽度
    但不是拖动frame的边框
    <body contentEditable>
    <img src='1.jpg' onresizeend='alert(window.parent.a.cols="300,5,*")'>
    </body>