Possible in IE and chrome although it does not work in firefox:
<script>
function toggleZoomScreen() {
document.body.style.zoom = "80%";
}
</script>
<img src="https://stackoverflow.com/questions/1055336/example.jpg" alt="example" onclick="toggleZoomScreen()">
More Related Contents:
- How to detect page zoom level in all modern browsers?
- Force page zoom at 100% with JS
- What is JavaScript’s highest integer value that a number can go to without losing precision?
- JavaScript, browsers, window close – send an AJAX request or run a script on window closing
- How to detect my browser version and operating system using JavaScript?
- How to determine user’s locale within browser?
- Is it possible to sandbox JavaScript running in the browser?
- Browser Javascript Stack size limit
- Appending HTML string to the DOM
- How can I close a browser window without receiving the “Do you want to close this window” prompt?
- How do I make JavaScript beep?
- How to copy text to the client’s clipboard using jQuery? [duplicate]
- Browser/HTML Force download of image from src=”data:image/jpeg;base64…”
- Detecting if a browser is using Private Browsing mode
- Manipulating innerHTML removes the event handler of a child element? [duplicate]
- Browser event when downloaded file is saved to disk
- Method for streaming data from browser to server via HTTP
- Dynamic require in RequireJS, getting “Module name has not been loaded yet for context” error?
- Can Read-Only Properties be Implemented in Pure JavaScript?
- Force browser to refresh CSS, JavaScript, etc
- Within a web browser, is it possible for JavaScript to obtain information about the HTTPS Certificate being used for the current page?
- JavaScript memory limit
- Ask for confirm when closing a tab [closed]
- Can I resize the browser window?
- How to check if css value is supported by the browser?
- Change Height based on Browser Size/Resize
- Is it possible to catch browser’s File Open/Save dialog event using Javascript
- Equivalent of Firefox’s “error console” in other browsers
- D3.js Set initial zoom level
- Could a website force the browser to go into fullscreen mode?