Synthead@lemmy.worldM to Very Real Tech Pics@lemmy.worldEnglish · 1 year 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 · 1 year agomessage-square12fedilink
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up23·1 year agoThat code wouldn’t work, the variable hack is never set.
minus-squaremacniel@feddit.delinkfedilinkarrow-up10·1 year 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·1 year 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·1 year agoYou are right. I honestly stopped reading halfway through, just assumed they were all else if’s
minus-squareemptiestplace@lemmy.mllinkfedilinkarrow-up1arrow-down3·1 year agoright at the top, it is set to var code
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up1·1 year 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·1 year 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.