This action will force synchronization from BOOM2354/StudyStudio, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
// This is moveText.js - used with moveText.htmlvar dom, x, y, finalx = 300, finaly = 300;// ************************************************* //// A function to initialize the x and y coordinates// of the current position of the text to be moved,// and then call the mover functionfunction initText() {dom = document.getElementById('theText').style;/* Get the current position of the text */var x = dom.left;var y = dom.top;/* Convert the string values of left and top tonumbers by stripping off the units */x = x.match(/\d+/);y = y.match(/\d+/);/* Call the function that moves it */moveText(x, y);} /*** end of function initText */// ************************************************* //// A function to move the text from its original// position to (finalx, finaly)function moveText(x, y) {/* If the x coordinates are not equal, movex toward finalx */if (x != finalx)if (x > finalx) x--;else if (x < finalx) x++;/* If the y coordinates are not equal, movey toward finaly */if (y != finaly)if (y > finaly) y--;else if (y < finaly) y++;/* As long as the text is not at the destination,call the mover with the current position */if ((x != finalx) || (y != finaly)) {/* Put the units back on the coordinates beforeassigning them to the properties to cause themove */dom.left = x + "px";dom.top = y + "px";/* Recursive call, after a 1-millisecond delay */setTimeout("moveText(" + x + "," + y + ")", 1);}} /*** end of function moveText */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。