录制的鼠标路径.docx
- 文档编号:28798593
- 上传时间:2023-07-19
- 格式:DOCX
- 页数:4
- 大小:14.61KB
录制的鼠标路径.docx
《录制的鼠标路径.docx》由会员分享,可在线阅读,更多相关《录制的鼠标路径.docx(4页珍藏版)》请在冰豆网上搜索。
录制的鼠标路径
--
varmousex=newArray();
varmousey=newArray();
vari;
varj=0;
vark;
varrecordcount=0;
varrepeat;
varrepeat2;
varrepeat3;
varspeed=50;
functionstartthis(){
recordcount=1;
i=0;
mousex=newArray();
mousey=newArray();
recordthis();
}
functionrecordthis(){
if(maxnum.value==''||isNaN(maxnum.value)==true||maxnum.value<0){
if(recordcount==1){
mousex[i]=mousefollow.offsetLeft;
mousey[i]=mousefollow.offsetTop;
i++;
k=i;
textfield.value='无时间限制';
}
}
else{
if(recordcount==1){
if(i mousex[i]=mousefollow.offsetLeft; mousey[i]=mousefollow.offsetTop; i++; k=i; textfield.value='剩余'+(maxnum.value-i)+'/50秒'; } else{ recordcount=0; textfield.value='时间到';} } } repeat=setTimeout("recordthis()",20); } functionstopthis(){ clearTimeout("repeat"); recordcount=0; } functionplaythis(){ clearTimeout("repeat"); clearTimeout("repeat3"); recordcount=0; if(j ; ; ; j++; repeat2=setTimeout("playthis()",speed); } else{clearTimeout("repeat2"); ; j=0; } } functionrewindthis(){ clearTimeout("repeat"); clearTimeout("repeat2"); recordcount=0; if(k>0){ ; ; ; k--; repeat3=setTimeout("rewindthis()",speed); } else{clearTimeout("repeat3"); ; k=i; } } functionfollow(){ ; ; } //--> absolute;width: 12px;height: 21px;z-index: 1;visibility: hidden">
absolute;width: 12px;height: 21px;z-index: 1;visibility: hidden">.
100px"value="无时间限制">