How to create text slideshow using Javascript

Last updated on May 11th, 2022 at 08:42 am

Click to rate this tutorial!
[Total: 48 Average: 2.7]

This is a very simple information box using JavaScript which will have an array of text. These texts inside the array will be displayed as slideshow using setTimeout(). You can add any number of messages by adding new array name, For example here you can add new messages by assigning array like notices[9], notices[10] etc.,

notices[1] = "Welcome to Mistonline.in Website";       
notices[2] = "One of the biggest website that provide web based tutorials";
notices[3] = "Free and effective tutorials on all famous programming languages";       
notices[4] = "PHP, Javascript, Ajax, Mysql, PERL, Apache etc.,";
notices[5] = "New tutorials added every month";
notices[6] = "More than 200 tutorials. ";
notices[7] = "All are effective and working tutorials, which are tested in our servers.";
notices[8] = "We are growing each day, with 85% new visits every month.";   

DOWNLOAD THE JS part from here

Javascript Download

This is our HTML with some CSS

<title>Slideshow Script Using Javascript</title>
<style>
input{
  background-color : #d1d1d1;
    color: #ff0000;
font-weight: bold;
font-size:30px;
 width: 1200px;
 height: 122px;
border:20px solid #9ecaed;
    border-radius:7px;
}
</style>
<script type='text/javascript' src='https://mistonline.in/wp/demo/my.js'></script>
<FORM name="messages">
<input type="text" height="48" readonly name="field" size=80>
</FORM>

Take a look at the demo 🙂
DEMO

Click to rate this tutorial!
[Total: 48 Average: 2.7]

Leave a Reply

Your email address will not be published.