本帖最后由 bestzrz 于 2012-05-18 09:59:32 编辑

解决方案 »

  1.   


    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="gb2312" />
    <title></title>
    <style>
    </style>
    </head>
    <body>
    <embed id="test" src="flash921.swf" style="border:1px solid red; position:relative;"></embed>
    <button id="t">123</button>
    <script>
    function $(el){
    return typeof el == 'string' ? document.getElementById(el) : el;
    }

    $('t').onclick = function(){
    $('test').style.width = '323px';
    $('test').style.top = '323px';
    }
    </script>
    </body>
    </html>
    测试了,没重新加载啊
      

  2.   


    <!DOCTYPE HTML>
    <html>
        <head>
            <meta charset="gb2312" />
            <title></title>    
            <style>
            </style>        
        </head>
        <body>
            <embed id="test" src="flash921.swf" style="border:1px solid red; position:relative;"></embed>
            <button id="t">123</button>
            <script>
                function $(el){
                    return typeof el == 'string' ? document.getElementById(el) : el;
                }
                
                $('t').onclick = function(){
                    $('test').style.width = '323px';
                    $('test').style.top = '323px';
                    $('test').style.position = 'absolute';
                }
            </script>
        </body>
    </html>
    修改成绝对定位就会
      

  3.   

    在ff下 确实重新加载了,ie 6、7、8 chrome 下没重新加载试着 改变其 父容器的css也不行<!DOCTYPE HTML>
    <html>
        <head>
            <meta charset="gb2312" />
            <title></title>    
            <style>
            </style>        
        </head>
        <body>
    <div id="test">
    <embed id="test" src="flash921.swf" style="border:1px solid red;"></embed>
    </div>
            <button id="t">123</button>
            <script>
                function $(el){
                    return typeof el == 'string' ? document.getElementById(el) : el;
                }
                
                $('t').onclick = function(){
                    $('test').style.width = '323px';
                    $('test').style.top = '223px';
                    $('test').style.position = 'absolute';
                }
            </script>
        </body>
    </html>
    也有人发现过这个 问题
    http://blog.csdn.net/helloint/article/details/6438966
    再看看。
      

  4.   

    我又试了下,如果position默认absolute,Javascript中不修改position就没问题,但这不是我想要的,我想要在原始状态下object不包含任何样式。放大播放器就设置style,缩小播放器就清除style。还有,我是在chrome测试的,版本18.0