<html>
<body>
<input type="button" value="sd" onclick="doThis();"/><br/>
<div >nContainer[0]</div>

<div >nContainer[1]</div>

<div >nContainer[2]</div>

<div >nContainer[3]</div>

<div >nContainer[4]</div>

<div />

<SCRIPT LANGUAGE="JavaScript">
function doThis()
{
   var a = document.getElementById("111");
   a.style.left=(document.body.clientWidth/2-a.clientWidth/2)+"px";
   a.style.top=(document.body.scrollTop+document.body.clientHeight/2-a.clientHeight/2)+"px";
}

</SCRIPT>
</body>
</html>

相关文章:

  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-10-31
  • 2021-11-27
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2021-06-07
  • 2021-11-30
  • 2022-12-23
  • 2021-08-12
  • 2021-06-03
  • 2021-07-06
相关资源
相似解决方案