Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to use java script



how to use java script ..

Answer / fathimath thasneem

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maximize Image Example</title>
<style>
.full-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 9999;
}
#myImage {
width: 50%; /* Initially set to 50% of the container width */
cursor: pointer; /* Changes the cursor to a pointer to indicate it's clickable */
}
</style>
</head>
<body>

<img id="myImage" src="path_to_your_image.jpg" alt="Click to maximize">

<script>
const img = document.getElementById('myImage');

img.addEventListener('click', function() {
// Check if the image already has the full-screen class
if (img.classList.contains('full-screen')) {
img.classList.remove('full-screen'); // If yes, remove it (minimize)
} else {
img.classList.add('full-screen'); // Otherwise, add it (maximize)
}
});
</script>

</body>
</html>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

How to make a array as a stack using javascript?

0 Answers  


How do you extend classes Code snippet: const circle = { radius: 20, diameter() { return this.radius * 2; }, perimeter: () => 2 * Math.PI * this.radius };

1 Answers  


What is the use of a map object in javascript?

0 Answers  


How can JavaScript be used?

0 Answers   Deloitte, JPMorgan Chase,


What is array constructor in javascript?

0 Answers  


How do you check if a variable is an object

0 Answers  


What are the various functional components in javascript?

0 Answers  


What does three dots mean in texting?

0 Answers  


How and where javascript namespacing is used?

0 Answers  


How many days it will take to learn javascript?

0 Answers  


What is the difference between childNode and children?

0 Answers  


show the date in textbox when we select item (items like-- today,yesterday,lastweek,lastmonth,lastyear) from dropdownlist using javascript?

1 Answers  


Categories