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 onload="initial()">
<div id="myImg" class="ball"><img src="ball.jpg"><div>
<form>
<input type="button" onclick="startRound()" value="开始旋转">
<input type="button" onclick="endRound()" value="结束旋转">
<input type="button" onclick="initial()" value="新增表达式">
<input type="button" onclick="removeLeft()" value="删除Left表达式">
</form>
</body>
</html>
3686

被折叠的 条评论
为什么被折叠?



