<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="experiment">実験</div>
<script type="text/javascript">
var Count = parseInt(0);
function f(){
var target;
// <div id="element名"> オブジェクトを取得します。
target = document.getElementById('experiment');
Width = target.clientWidth;
Height = target.clientHeight;
// オブジェクトの座標情報を変更します。
target.style.left = parseInt(Count) + Math.round((window.innerWidth / 2)) - Math.round(Width/2) + 'px';
target.style.top = 10 + '%';
Count = parseInt(Count + 1);
document.write(parseInt(Count));
}
function starttimer(){
setInterval("f()",1000);
}
f();
starttimer();
</script>
</body>
</html>
どうか改善法をご教授ください