最简单的做法就是用CSS里的 expression: (IE支持)
<img src="http://expert.csdn.net/images/csdn.gif" border=0 style="position: absolute; top:expression(document.body.scrollTop + document.body.clientHeight - this.clientHeight); left:expression(document.body.scrollLeft + document.body.clientWidth - this.clientWidth);">
<div style="width: 2000; height: 2000"></div>
<img src="http://expert.csdn.net/images/csdn.gif" border=0 style="position: absolute; top:expression(document.body.scrollTop + document.body.clientHeight - this.clientHeight); left:expression(document.body.scrollLeft + document.body.clientWidth - this.clientWidth);">
<div style="width: 2000; height: 2000"></div>
<img src="http://expert.csdn.net/images/csdn.gif" border=0 style="position: absolute; top:expression(parseInt(document.body.scrollTop)); left:expression(document.body.scrollLeft + document.body.clientWidth - this.clientWidth);">
<div style="width: 2000; height: 2000"></div>
</div>
<script language="javascript">
<!--
window.onload = resizeDiv;
window.onresize = resizeDiv;
window.onscroll = resizeDiv;
window.onerror = function(){}
function resizeDiv()
{
var obj=document.getElementById("eMeng")
try{
divWidth = parseInt(obj.offsetWidth,10)
docWidth = document.body.clientWidth;
obj.style.top = parseInt(document.body.scrollTop,10)
obj.style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}
-->
</script>
showModelessDialog('ttt.htm','','dialogWidth: 480px; dialogHeight: 360px; status: no; help: no');