How to Use JavaScript Injections

Sample Injections

How to Use JavaScript Injections Picture 1 Sample Javascript Injections
Method 1 of 1:

Using JavaScript Injections

  1. How to Use JavaScript Injections Picture 2
    You must enter the code in the URL address bar of the window. Try these injections:
    1. Note - If you use Firefox, you will have to use another way, like cmd-shift-k on a Mac
    2. javascript:alert("Hello!");
    3. To bring up an alert box saying "Hello!":
  2. How to Use JavaScript Injections Picture 3
    javascript:alert("Hello"); alert("World");
    1. To bring up 2 alert boxes, the one in the front will say "Hello" and once you click OK, the one saying "World" will appear:
  3. How to Use JavaScript Injections Picture 4
    javascript:alert(document.forms[0].to.value="something")
    1. To change the value of form [0] to something:
  4. How to Use JavaScript Injections Picture 5
    javascript:void(document.bgColor="blue")
    1. To change the background color to blue. You can put any other color in the place of blue to change it to a different color:
  5. How to Use JavaScript Injections Picture 6
    javascript:alert("The actual url is:tt" + location.protocol + "//" + location.hostname + "/" + "nThe address URL is:tt" + location.href + "n" + "nIf the server names do not match, this may be a spoof.");
    1. To see the real server name of the site you are looking at. You should use it if you think that you are viewing a spoofed website, or anytime just to make sure:
  6. How to Use JavaScript Injections Picture 7
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);
    1. To make pictures fly around. Make sure to find a site like Google Images so there are more pictures!(If you press the refresh button, it goes really fast, but might only work with macOS):
  7. How to Use JavaScript Injections Picture 8
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.cos(R*x1+i*x1+x2)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);
    1. To spin circle of pictures. It funnels the pictures in a snake-like motion:
  8. How to Use JavaScript Injections Picture 9
    javascript:document.body.contentEditable='true';document.designMode='on';void 0
    1. To move things around on the webpage:
4 ★ | 2 Vote

May be interested

  • How to Enable JavaScriptPhoto of How to Enable JavaScript
    this wikihow teaches you how to turn on your computer browser's javascript, which allows your browser to load and view certain elements--such as videos or animations--on some web pages. you can enable javascript using chrome on desktop and...
  • How to Disable JavaScriptPhoto of How to Disable JavaScript
    this wikihow teaches you how to turn off your web browser's javascript support. javascript is responsible for loading dynamic content in webpages, so turning it off can help websites load faster than usual. most web browsers and their...
  • How to Set the Path in JavaPhoto of How to Set the Path in Java
    this wikihow teaches you how to set the path for your java installation on windows, macos, and linux. if you're using a windows pc or mac and have just installed java, there's typically no need to do this manually as the path is set during...
  • How to Get Input from Console in JavaPhoto of How to Get Input from Console in Java
    to start with, you need to determine the operating system that is being used. to begin with, you have to launch the control panel. the command to launch the same varies in the windows based operating system and the mac based operating...
  • How to Use I/O Streams in JavaPhoto of How to Use I/O Streams in Java
    no matter which programming language one chooses, performing input and output operations are the core knowledge that one definitely needs to posses. from disk files, devices, other programs to memory arrays, a stream can represent a...
  • How to Download Java to Internet ExplorerPhoto of How to Download Java to Internet Explorer
    have you been trying to enter a web page on internet explorer and you kept getting blocked because it says you don't have java? follow this step-by-step guide to installing java for internet explorer to experience java-optimized websites....