answersLogoWhite

0

Here is the code:

<html>

<head>

<script type="text/javascript" language="javascript">

function loadImage()

{

var image1 = new Image();

var image2 = new Image();

var image3 = new Image();

image1.src = "mypic.jpg"; // Put any image you

image2.src = "mypic2.jpg";

image3.src = "mypic3.png";

if(!document.images)

{

alert("No Images!!");

}

document.images.slide.src=eval("image"+step+".src");

if (step<3)

step++;

else

step=1;

//call function "slideit()" every 4 seconds

setTimeout("loadImage()",4000);

}

loadImage();

</script>

</head>

<body onload="loadImage()">

<img src="mypic.jpg" class="image" name="slide" />

</body>

</html>

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

How to make a Show Hide HTML?

You cannot make an html for show hide, one can simply use javascript to create the show hide code that you are looking for. Depending on what you want, the code is fairly simple using a javascript html code resources.


How do you add a click event to a java button?

we can do this using of javascript. you can use this following code: &lt;input type=button value="button" onClick=onclick_function()&gt; here onclick_function() is a function which is called by javascript on clicking the button. javascript code is as follows: &lt;script language="javascript" type="text/javascript"&gt; // your code for onclick_function() function onclick_function(){ alert("Welcome to javascript"); } &lt;/script&gt;


What is a javascript tutorial?

A JavaScript tutorial contains instructions that will teach you how to code in JavaScript.


Can you use JavaScript within the form tag?

You can call an external javascript file or javascript code located inside the head or body tag from a form using event handlers. I am not sure if you can or cannot use javascript code inside form tags but am sure that it is not a good programming practise to put code of two different language (js &amp; html) together


What is the php code to close the existing window using button?

It is not a PHP code but a Javascript code. w3schools.com has all the answers you need about Javascript. It will teach you how to use the code and implement it into your website. If you're creating your own websites I suggest you actually learn the code. It will come in handy later on.

Related Questions

How does one submit a form using JavaScript?

You can submit a form with Javascript by using certain code which allows you to firstly create a form then nest this with a button that will submit when, for example, a user clicks on it.


How to make a Show Hide HTML?

You cannot make an html for show hide, one can simply use javascript to create the show hide code that you are looking for. Depending on what you want, the code is fairly simple using a javascript html code resources.


How do you create a simple JavaScript message inside the HTML?

You need to type the following code to create a simple JavaScript message inside the HTML


How do you add a click event to a java button?

we can do this using of javascript. you can use this following code: &lt;input type=button value="button" onClick=onclick_function()&gt; here onclick_function() is a function which is called by javascript on clicking the button. javascript code is as follows: &lt;script language="javascript" type="text/javascript"&gt; // your code for onclick_function() function onclick_function(){ alert("Welcome to javascript"); } &lt;/script&gt;


How do you show the text box output in the browser using Ajax code?

You can directly do that in the JavaScript. Just get the value of the input type in JavaScript using id and show it using .innerHTML.


How do you open the dialog box?

code for opening the font dialog box using javascript


What is a javascript tutorial?

A JavaScript tutorial contains instructions that will teach you how to code in JavaScript.


How do you connect javascript using php?

Any communication between Javascript code and PHP code needs to be instigated by the Javascript. This is because Javascript is a client side script and PHP is server side. The server can't force data to the browser; it can only reply to requests. The technique of using Javascript on the client side to talk to server side scripts is referred to as AJAX (Asynchronous Javascript And XML). There are several libraries available for simplifying it's usage, and many online tutorials.


Can you use JavaScript within the form tag?

You can call an external javascript file or javascript code located inside the head or body tag from a form using event handlers. I am not sure if you can or cannot use javascript code inside form tags but am sure that it is not a good programming practise to put code of two different language (js &amp; html) together


How do you call script code in javascript without using onclick?

function blahblah () { //do something } blahblah();


What is the php code to close the existing window using button?

It is not a PHP code but a Javascript code. w3schools.com has all the answers you need about Javascript. It will teach you how to use the code and implement it into your website. If you're creating your own websites I suggest you actually learn the code. It will come in handy later on.


Is jQuery a high level language?

jQuery is like an advanced JavaScript code. jQuery is a JavaScript code library that gives you more features with less code that what Javascript would require. If you understand JavaScript, jQuery wouldn't be much of a change.