Troubles in js exercises

simple text movement via js

html file

    if(!document.getElementById) return false;
    if(!document.getElementById("message")) return false;
    var elem = document.getElementById("message");
    elem.style.position = "absolute";
    elem.style.left = "50px";
    elem.style.top = "100px";
    moveElement("message",200,100,10);
}

addLoadEvent (positionMessage);
the effect you want to achieve is text movement
, but in fact positiMessage successfully calls
but no text movement effect occurs;
and the browser reports an error [Web browser] "Uncaught SyntaxError: Unexpected number" (1)

May.28,2021

JSBIN

you have a big problem with this code. You don't consider the direction

. < hr >

modified a place

clipboard.png


:

clipboard.png
this place is supposed to concatenate it into a "moveElement ('message',200,100,10)" . If you remove this single quote, the splicing will become "moveElement (message,200,100,10)" , and then when setTimeout is called, it will become
new Function ("moveElement (message,200,100,10)") (),. At this time message is just a meaningless character, not a global variable, so the program goes wrong

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45b63-44b64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45b63-44b64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?