<style>*{margin:0}body{ height:1000px; width:1000px; } #a{ width:300px; height:100px; background:red; }</style><script>var isie6 = window.XMLHttpRequest?false:true;window.onload = function(){ var a = document.getElementById('a'); var d = document.getElementById('d'); if(isie6){ a.style.position = 'absolute'; window.onscroll = function(){ d.innerHTML = ''; } }else{ a.style.position = 'fixed'; } a.style.left= '0'; a.style.bottom = '0';}</script><body style="height:1000px;"><div id ="d" style="display:none;">rgrrrrrrrr</div><div id='a'>test</div>提示:您可以先修改部分代码再运行