Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9285559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:11:49+00:00 2026-06-18T19:11:49+00:00

This piece of code pulls off all the images from your web page and

  • 0

This piece of code pulls off all the images from your web page and rotates them in a circle. Really makes any page go naked (without its images). The best place to test is a website with many images. (Google Images for an example).simply place these code the url of any websites for e.g say goggle,remember u need to manually type “javascript:”

 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.getElementsByTagName("img");
 DIL=DI.length; 
 function A(){for(i=0; i-DIL; i++)//is equal to for(i=0; i < DIL; i++)
 { 
 DIS=DI[ i ].style;
 DIS.position='absolute';
 DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; 
 DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}

R++

}
 setInterval('A()',5); void(0);//u can also use undefined here or u can pass these code to void(all code goes here);
//but u should not pass return false as it is used within a function to exit and return specified value

when undefined is returned browser reads that and dont nevigate away from the
current page.if not placed it redirects to next blank page.so its compulsory.also u can pass expression to void(exp here),it will be evaluated no problem but main thing to take in mind is that it always returns undefined which is necessary for browser also remember javascript: is a uri scheme similar to http: so u know when knew address to placed to url browser nevigates to that page even if it dont exist.In javascript: scheme ,browser executes the javascript code and writes that to new page .the void operator at the end of the uri returns undefined like void (exp)/void exp returns undefined which gets executed and prevents browser from taking default action

If you look carefully in the above code, its rotating the HTML “img” tag. Just replace it with “a” or “p” and watch some links or text rotate instead of images.But can anyone explain what is actually happening in the code?Also what does “javascript:” keyword actually do?

in the href attribut for hypertext document it uses http scheme .other time we can use javascript: scheme

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:11:50+00:00Added an answer on June 18, 2026 at 7:11 pm

    There are two parts you need to pay attention to:

    setInterval('A()', 5);
    

    This executes the A function every 5 milliseconds.

    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)+"px"; 
            DIS.top = (Math.cos(R*y1+i*y2+y3)*y4+y5)+"px";
        }
        R++;
    }
    

    This function cycles through every element found, sets its position to absolute (not necessary to do this over and over), and then adjusts its left and top values, thus redrawing it in the viewport every 5 milliseconds in a new location.

    If your confusion is regarding the math of locating the next location at which each element will be positioned, there’s an entirely different site for those questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This piece of code is from Adobe docs : package { import flash.display.Loader; import
Using this piece of code in the head of a page: <script type=text/javascript> function
I have the following piece of code that pulls an image URL from a
This piece of code takes a row from 1.txt and splits it into columns.
I have this small piece of code that simply pulls in a news release
This piece of code compiles and runs as expected on GCC 3.x and 4.x:
This piece of code is supposed to go through a list and preform some
This piece of code gives a syntax error at the colon of elif process.loop(i,
This piece of code used to work in MVC 1 but it does not
this piece of code worked fine on my machine, but it doesn't on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.