js实现div的置底

//-------------置底的div----------------------

<div class="mui-content lv-mrcd"  id="scrollmenu" onclick="Topfun()"><P align=right>点我置顶&nbsp;&nbsp;&nbsp;&nbsp;</P></div>

//-------------js代码---------------------

 

 

var oDiv = document.getElementById('scrollmenu');
var he = window.screen.availHeight-80;
var wi = window.screen.availWidth-90;
oDiv.style.position = 'fixed';
oDiv.style.top = he+'px';
oDiv.style.left = wi+'px';

 

posted @ 2018-01-08 14:35  baby孔祥超  阅读(1585)  评论(0编辑  收藏  举报