Synthead@lemmy.worldM to Very Real Tech Pics@lemmy.worldEnglish · 11 months agodocument.write("<b>Hacked!!!</b>")lemmy.worldimagemessage-square12fedilinkarrow-up1141arrow-down12
arrow-up1139arrow-down1imagedocument.write("<b>Hacked!!!</b>")lemmy.worldSynthead@lemmy.worldM to Very Real Tech Pics@lemmy.worldEnglish · 11 months agomessage-square12fedilink
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up23·11 months agoThat code wouldn’t work, the variable hack is never set.
minus-squareundetermined@lemmy.worldlinkfedilinkarrow-up17arrow-down1·11 months agodeleted by creator
minus-squaremacniel@feddit.delinkfedilinkarrow-up10·11 months agoExcept that’s how you write JavaScript embedded in html. At least that was the way when there were browsers that didn’t know the script-tag.
minus-squarekautau@lemmy.worldlinkfedilinkarrow-up7·11 months agoNo, the variable code is set to a string of “hack” The code will work, but will just run the course of the else path and replace all the HTML with bold text that says “Unknown Reso And whatever else that cut off string contains
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up1·11 months agoYou are right. I honestly stopped reading halfway through, just assumed they were all else if’s
minus-squareemptiestplace@lemmy.mllinkfedilinkarrow-up1arrow-down3·11 months agoright at the top, it is set to var code
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up1·11 months agovar code is set to hack. Though the code would run didn’t notice the lace condition is an else not an else if
minus-squareemptiestplace@lemmy.mllinkfedilinkarrow-up1·11 months agoI wasn’t being serious. Lace condition sounds scandalous.
That code wouldn’t work, the variable hack is never set.
deleted by creator
Except that’s how you write JavaScript embedded in html. At least that was the way when there were browsers that didn’t know the
script
-tag.No, the variable
code
is set to a string of “hack”The code will work, but will just run the course of the
else
path and replace all the HTML with bold text that says “Unknown ResoAnd whatever else that cut off string contains
deleted by creator
deleted by creator
You are right. I honestly stopped reading halfway through, just assumed they were all else if’s
right at the top, it is set to
var code
var code is set to hack. Though the code would run didn’t notice the lace condition is an else not an else if
I wasn’t being serious. Lace condition sounds scandalous.