Synthead@lemmy.worldM to Very Real Tech Pics@lemmy.worldEnglish · 2 years agodocument.write("<b>Hacked!!!</b>")lemmy.worldimagemessage-square12fedilinkarrow-up1130arrow-down12
arrow-up1128arrow-down1imagedocument.write("<b>Hacked!!!</b>")lemmy.worldSynthead@lemmy.worldM to Very Real Tech Pics@lemmy.worldEnglish · 2 years agomessage-square12fedilink
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up22·2 years agoThat code wouldn’t work, the variable hack is never set.
minus-squaremacniel@feddit.delinkfedilinkarrow-up10·2 years 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-up6·2 years 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·2 years agoYou are right. I honestly stopped reading halfway through, just assumed they were all else if’s
minus-squareemptiestplace@lemmy.mllinkfedilinkarrow-up1arrow-down4·2 years agoright at the top, it is set to var code
minus-squaresettoloki@lemmy.onelinkfedilinkarrow-up1·2 years 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·2 years 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
You are right. I honestly stopped reading halfway through, just assumed they were all else if’s
deleted by creator
deleted by creator
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.