function moveAngle(intStep){//移动角度
return intStep/stepPerRound%(2*Math.PI);
}
function xPosition(intStep){//计数新坐标X
var currx=originalX+Math.round(Math.cos(moveAngle(intStep))*intRadius);
return currx-myImg.style.width/2;
}
function yPosition(intStep){//计算新坐标Y
var curry=originalY+Math.round(Math.sin(moveAngle(intStep))*intRadius);
return curry-myImg.style.height/2;
}
function removeLeft(){//删除Left表达式
myImg.style.removeExpression("left");
}
</script>
</head>
<body οnlοad="initial()">
<div id="myImg" class="ball"><img src="ball.jpg"><div>
<form>
<input type="button" οnclick="startRound()" value="开始旋转">
<input type="button" οnclick="endRound()" value="结束旋转">
<input type="button" οnclick="initial()" value="新增表达式">
<input type="button" οnclick="removeLeft()" value="删除Left表达式">
</form>
</body>
</html>