你再试试<script language="javascript">function show() {
         var v = document.createElement('DIV');
v.style.position = 'absolute';
v.style.left = '0px';
v.style.top = '0px';
v.style.width = '100%';
v.style.height = '100%';
v.style.backgroundColor = 'red';
document.body.appendChild(v);
}show();
</script>

解决方案 »

  1.   

    你说的不能用是什么意思?<body style="height:100%;margin:0">
    <script language="javascript">
    function show() {
    var v = document.createElement('DIV');
    v.style.position = 'absolute';
    v.style.left = '0px';
    v.style.top = '0px';
    v.style.width = '100%';
    v.style.height = '100%';
    v.style.backgroundColor = 'red';
    document.body.appendChild(v);
    }
    show();
    </script>
    </body>
      

  2.   

    你倒是不傻下边添了一句代码,看到了吗你不调用这个Function怎么执行