add 10px to width js
JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript Increasing and Decreasing Image Size</title>
<style>
button{
padding: 3px 6px;
}
button img{
vertical-align: middle;
}
</style>
<script>
function zoomin(){
var myImg = document.getElementById("sky");
var currWidth = myImg.clientWidth;
if(currWidth == 500){
alert("Maximum zoom-in level reached.");
} else{
myImg.style.width = (currWidth + 50) + "px";
}
}
function zoomout(){
var myImg = document.getElementById("sky");
var currWidth = myImg.clientWidth;
if(currWidth == 50){
alert("Maximum zoom-out level reached.");
} else{
myImg.style.width = (currWidth - 50) + "px";
}
}
</script>
</head>
<body>
<p>
<button type="button" onclick="zoomin()"><img src="/examples/images/zoom-in.png"> Zoom In</button>
<button type="button" onclick="zoomout()"><img src="/examples/images/zoom-out.png"> Zoom Out</button>
</p>
<img src="/examples/images/sky.jpg" id="sky" width="250" alt="Cloudy Sky">
</body>
</html>
Also in JavaScript:
- Title
- dotnet core ajax post of an ojject site:stackoverflow.com
- Category
- JavaScript
- Title
- how to get the timestamp in javascript
- Category
- JavaScript
- Title
- defining props in react
- Category
- JavaScript
- Title
- angular trigger input change
- Category
- JavaScript
- Title
- discord.js
- Category
- JavaScript
- Title
- convert jquery to string
- Category
- JavaScript
- Title
- javascript check if variable is number
- Category
- JavaScript
- Title
- add dynamic value to id attribute in angular 8
- Category
- JavaScript
- Title
- href back page javascript
- Category
- JavaScript
- Title
- how to do animation with pure javascript with no html
- Category
- JavaScript
- Title
- how to build a string javascript es6
- Category
- JavaScript
- Title
- how to check an empty array js
- Category
- JavaScript
- Title
- how to check reactjs version in command prompt
- Category
- JavaScript
- Title
- bind jquery trough name
- Category
- JavaScript
- Title
- export app react native
- Category
- JavaScript
- Title
- eyeshot javascript version
- Category
- JavaScript
- Title
- deparam javascript
- Category
- JavaScript
- Title
- add jquery to wordpress
- Category
- JavaScript
- Title
- check if message mentions users discord js
- Category
- JavaScript
- Title
- character to ascii in js
- Category
- JavaScript
- Title
- charat javascript
- Category
- JavaScript
- Title
- Angular empty object
- Category
- JavaScript
- Title
- how to read 2 dimensional array in javascript
- Category
- JavaScript
- Title
- generate random ip address javascript
- Category
- JavaScript
- Title
- chart.js radar chart
- Category
- JavaScript
- Title
- convert milliseconds to minutes and seconds javascript
- Category
- JavaScript
- Title
- event handler attachment jquery
- Category
- JavaScript
- Title
- define a route with path paramters in nodejs
- Category
- JavaScript
- Title
- angular submit form programmatically
- Category
- JavaScript
- Title
- apache log format json
- Category
- JavaScript
- Title
- accept 2 values after decimal in angular forms
- Category
- JavaScript
- Title
- how to print to console javascript
- Category
- JavaScript
- Title
- add discord.js library
- Category
- JavaScript
- Title
- find a single element in array of objects javascript
- Category
- JavaScript
- Title
- append new element for each value in array d3.js
- Category
- JavaScript
- Title
- how to add script before </body> in magento 2
- Category
- JavaScript
- Title
- how to make a proxy server node.js
- Category
- JavaScript
- Title
- adonisjs livereload
- Category
- JavaScript
- Title
- 'ts-node' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.
- Category
- JavaScript
- Title
- javascript check if argument is passed
- Category
- JavaScript
- Title
- add custom marker in react-mapbox-gl
- Category
- JavaScript
- Title
- angular email validation
- Category
- JavaScript
- Title
- array map javascript
- Category
- JavaScript
- Title
- add month date now javascript
- Category
- JavaScript
- Title
- how to create a object in javascript
- Category
- JavaScript
- Title
- brute force search javascript
- Category
- JavaScript
- Title
- get today's date javascript
- Category
- JavaScript
- Title
- javascript checkbox checked
- Category
- JavaScript
- Title
- export component in
- Category
- JavaScript
- Title
- client side redirect javascript
- Category
- JavaScript
- Title
- dataset js
- Category
- JavaScript
- Title
- how to make a tile generation system in javascript
- Category
- JavaScript
- Title
- curl post file json
- Category
- JavaScript
- Title
- align left text in reactstrap
- Category
- JavaScript
- Title
- how to change node version
- Category
- JavaScript
- Title
- javascript add to object
- Category
- JavaScript
- Title
- functional component react
- Category
- JavaScript
- Title
- busca binária em javascript
- Category
- JavaScript
- Title
- javascript change url hash
- Category
- JavaScript
- Title
- angular img
- Category
- JavaScript
- Title
- how to use jq with json data
- Category
- JavaScript
- Title
- check the doc name in javascript
- Category
- JavaScript
- Title
- javascript capitalize string
- Category
- JavaScript
- Title
- how to return the number of nodes in a linked list
- Category
- JavaScript
- Title
- javascript check for duplicates in array
- Category
- JavaScript
- Title
- conditional jsx property
- Category
- JavaScript
- Title
- adding cors in angular
- Category
- JavaScript
- Title
- blur javascript
- Category
- JavaScript
- Title
- how To fetch the index of dropdown using jquery
- Category
- JavaScript
- Title
- empty textarea using jquery
- Category
- JavaScript
- Title
- how to convert audio blocb to base64 string
- Category
- JavaScript
- Title
- .push js
- Category
- JavaScript
- Title
- chart.js on hover and onclick event
- Category
- JavaScript
- Title
- insert into specific array index that has a value existing on that index
- Category
- JavaScript
- Title
- how to play sound on load js
- Category
- JavaScript
- Title
- how to set three js canvas width 100%
- Category
- JavaScript
- Title
- angular open poort in network
- Category
- JavaScript
- Title
- http server node example
- Category
- JavaScript
- Title
- check if checkbox is checked javascript
- Category
- JavaScript
- Title
- grayscale image in canvas
- Category
- JavaScript
- Title
- append after element jquery
- Category
- JavaScript
- Title
- array length javascript
- Category
- JavaScript
- Title
- How do I get Month and Date of JavaScript in 2 digit format
- Category
- JavaScript
- Title
- document delete element
- Category
- JavaScript
- Title
- How to scan a folder for documents with javascript
- Category
- JavaScript
- Title
- fs writefile node
- Category
- JavaScript
- Title
- get attribute value jquery href
- Category
- JavaScript
- Title
- angular run behind proxy
- Category
- JavaScript
- Title
- javascript add option element to select
- Category
- JavaScript
- Title
- for of array javascript
- Category
- JavaScript
- Title
- get url javascript
- Category
- JavaScript
- Title
- background url reactjs
- Category
- JavaScript
- Title
- get url of page in background script
- Category
- JavaScript
- Title
- how to add two attay into object in javascript
- Category
- JavaScript
- Title
- convert a string to html element in js
- Category
- JavaScript
- Title
- javascript change attribute
- Category
- JavaScript
- Title
- choose random from array javascript
- Category
- JavaScript
- Title
- how will it look when there is a container inside a a row bootstrap
- Category
- JavaScript
- Title
- find and delete element from array js
- Category
- JavaScript
- Title
- how to change h1 text using javascript from node
- Category
- JavaScript