PDA

View Full Version : Enter code in address bar to be able to edit the page



haywir3d
04-28-2009, 09:55 PM
What is the code you enter into the address bar of any site to be able to change the html content within the site? I cant remember if it had anything to do with DHTML or JAVA or HTML. Any help would be greatly appreciated.


Im trying to prank a buddy of mine.

jscheuer1
04-28-2009, 09:59 PM
Javascript can do this, but it depends upon what you want to change it to. The change will only be temporary.

haywir3d
04-28-2009, 10:24 PM
Yes. I was looking for the code that does this. It defaces a site page. Im trying to do it as a prank to someone but cant find the code that does it.

jscheuer1
04-29-2009, 01:17 AM
You can do something as simple as:


javascript:document.write('Who\'s Your Daddy?')

Paste that into the address bar, hit enter, and the page will disappear, replaced by:

Who's Your Daddy?

But, as I say, it really depends upon what you want to have happen. Further, the code could be obfuscated, so that it would be less obvious what the result would be:


javascript:document.write(unescape('%57%68%6f\%27%73%20%59%6f%75%72%20%44%61%64%64%79%3f'))

Nile
04-29-2009, 01:53 AM
I believe he was looking for the design mode and content editable on, saw something recently like this and navigated to it (http://www.lovingtech.net/forums/thread-941.html?highlight=editable).


javascript:document.body.contentEditable%20=%20'true';%20document.designMode='on';%20void%200


Like John said, this is temporary. It only makes the whole page a giant text editor.