我怎样才能得到它移动多长时间的价值并保存它。所以每次有人点击它都会加起来
var imgObj = null;
function init(){
imgObj = document.getElementById('myImage');
imgObj.style.position= 'relative';
imgObj.style.left = '0px';
}
function moveRight(){
if(parseInt(imgObj.style.left) < 700){
imgObj.style.left = parseInt(imgObj.style.left) + 10 + 'px';
}
if(parseInt(imgObj.style.left) == 700){
imgObj.style.left = parseInt(imgObj.style.left) + 0 + 'px';
}
}
window.onload =init;