manikant yadav

All generations.

When I click on an image next image comes

<!DOCTYPE html> <html> <head> <title>JavaScript</title> <script type="text/javascript"> var i = 0; function nextImage() { var image = document.getElementById('myImage'); image.setAttribute('src', 'image' + ++i + '.jpg'); } </script> </head> <body> <img id="myImage" src="image1.jpg" onclick="nextImage()"> </body> </html>

when clicking on an image next image comes and this be continues

<script> var myImage = document.querySelector('img'); var myButton = document.querySelector('button'); var myHeading = document.querySelector('h1'); function setUserName() { var myName = prompt('Please enter your name.'); localStorage.setItem('name', myName); myHeading.textContent = 'Mozilla is cool, ' + myName; } if(!localStorage.getItem('name')) { setUserName(); } else { var storedName = localStorage.getItem('name'); myHeading.textContent = 'Mozilla is cool, ' + storedName; } myButton.onclick = function() { setUserName(); } </script>

generate functionFri, 03 Feb 2023

when clicking on an image next image comes and this process continues

var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-

Javascript
View

when click ln a image next image come

html <img src="img_pulpit.jpg" onclick="myFunction(this);" width="100" height="140"> <img src="img_pulpit2.jpg" onclick="myFunction(this);" width="100" height="140"> <script> function myFunction(imgs) { var expandImg = document.getElementById("expandedImg"); var imgText = document.getElementById("imgtext"); expandImg.src = imgs.src; imgText.innerHTML = imgs.alt; expandImg.parentElement.style.display = "block"; } </script>

when clicking on an image next image comes and this process continues

<html> <body> <img id="slide" src="img_nature.jpg" width="100%" height="100%"> <script> var myImage = document.getElementById("slide"); var imageArray = ["img_nature_wide.jpg","img_fjords_wide.jpg","img_mountains_wide.jpg","img_lights_wide.jpg","img_nature_wide.jpg"]; var imageIndex = 0; function changeImage() { myImage.setAttribute("src",imageArray[imageIndex]); imageIndex++; if (imageIndex >= imageArray.length) { imageIndex = 0; } } // setInterval is also in milliseconds var intervalHandle = setInterval(changeImage,2000); myImage.onclick = function() { clearInterval(intervalHandle); } </script> </body> </html>

when clicking on an image next image come

<a href="https://www.google.com/search?q=pug"> <img src="https://s3.amazonaws.com/freecodecamp/pug.jpg" alt="pug" id="pug"> </a> <img src="https://s3.amazonaws.com/freecodecamp/pug-2.jpg" alt="pug-2" id="pug-2"> <script> document.getElementById("pug").addEventListener("click", function() { document.getElementById("pug").style.display = "none"; document.getElementById("pug-2").style.display = "block"; }); </script>

css from descriptionFri, 03 Feb 2023

make a navbar with a logo in a circle and a home and about us button color is black

.container-fluid { background-color: rgb(198, 225, 255); } .navbar-header{ height: 80px; } .navbar-brand{ padding: 20px; font-size: 20px; margin-left: 50px; font-family: 'Arvo', serif; color: black; background-color: white; } .navbar-nav li a{ font-size: 20px; color: white; font-family: 'Arvo', serif; font-weight: bold; } .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus { background-color: rgba(255, 255, 255, 0.2); color: white; } .navbar-default .navbar-nav>li>a { color: black; font-size: 20px; font

when clicking on an image next image comes and this process repeat

<img id="myImg" src="img_chania.jpg" alt="Flowers in Chania" width="460" height="345"> <script> var myImage = document.getElementById("myImg"); var imageArray = ["img_chania.jpg", "img_chania2.jpg", "img_flower.jpg", "img_flower2.jpg", "img_flower3.jpg"]; var imageIndex = 0; function changeImage () { myImage.setAttribute("src", imageArray[imageIndex]); imageIndex++; if (imageIndex >= imageArray.length) { imageIndex = 0; } } var intervalHandle = setInterval(changeImage, 1000); myImage.onclick = function () { clearInterval(intervalHandle); } </script>

Want to kickstart your project?Use the new AI Studio to create your code