Can we make print button without JavaScript?

Johar Ali
Published on 01-Feb-2018 10:35:21
Yes, we can easily make a print button as well as add an image to it.ExampleYou can try to run the following code to make a print button as image i.e. whenever a user clicks on the image, the print options are visible −Live Demo<!DOCTYPE html> <html>    <body>   ... Read More

How to find out which JavaScript events fired?

karthikeya Boyini
Published on 24-Apr-2018 11:09:49
To view which JavaScript events fired, follow the below steps. We’re taking events fired on the Google Chrome web browser:Open Google Chrome and press F12 to open Dev Tools.Now go to Sources TabGo to Event Listener Breakpoints, on the right:Click on the events and interact with the target element.If the event ... Read More

How to make an image responsive in HTML?

Ayyan
Published on 18-Jan-2018 06:51:10
To make an image responsive, you need to set two properties. Add image using the <img> tag and add CSS style for height and max-width to make it responsive. For example, style="height:auto;max-width:100%;"You can try to run the following code to make an image responsive in HTML −Note − To check ... Read More

What is the difference between local storage vs cookies?

varun
Published on 30-Jan-2018 12:27:11
On client and server, the following storages are available: local storage, session storage, and cookies.The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a ... Read More

How to secure my JavaScript using "Strict mode"?

usharani
Published on 30-Jan-2018 12:28:35
The “use strict” is a directive, which is a literal expression. It introduced in JavaScript 1.8.5. As the name suggests, “use strict” indicates that the code is to be executed in strict mode.Let us declare strict mode. To declare, add the keyword “use strict” in the beginning. For global scope, ... Read More

How to create clickable areas in an image in HTML?

Anjana
Published on 18-Jan-2018 06:44:37
To create clickable areas in an image, create an image map, with clickable areas. For example, on clicking a box, the different website opens and on clicking a triangle in the same image, a different website opens.The <area> tag defines an area inside an image-and nested inside a <map> tag. ... Read More

How much data can I store in JavaScript cookies?

varma
Published on 30-Jan-2018 12:33:41
The following are the details of the date you can store in JavaScript cookies −Web BrowserMaximum cookiesMaximum size per cookieGoogle Chrome1804096 bytesFirefox1504097 bytesOpera1804096 bytesAndroid504096 bytes

How to change text font in HTML?

Sai Subramanyam
Published on 17-Jan-2018 13:18:28
To change the text font in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-family, font-size, font-style, etc.HTML5 do not support the <font> tag, so the CSS style is used ... Read More

How to set src to the img tag in HTML from another domain?

Akshaya Akki
Published on 18-Jan-2018 06:33:08
To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load. ... Read More

What is the use of JavaScript cookies?

Giri Raju
Published on 30-Jan-2018 11:51:49
Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.Your server sends some data to the visitor's browser in the form of a cookie. The browser may accept the cookie. If it does, it is ... Read More
Advertisements