Front End Technology Articles

Page 637 of 652

How to store objects in HTML5 localStorage?

Shubham Vora
Shubham Vora
Updated on 06-Dec-2022 1K+ Views

In this tutorial, we will discuss how to store objects in HTML5 localStorage. We can access the Storage object and store data in it thanks to the interface window's localStorage property. There is no time limit on it. As a result, the data that is stored in it will remain until it is explicitly deleted. The localStorage data can't be removed by closing the browser. To store JavaScript objects in localStorage, we will investigate how to stringify and parse them into JSON strings and then how to store them in localStorage. Using the setItem() Method This setItem() method is used ...

Read More

Why is using onClick() in HTML a bad practice?

Shubham Vora
Shubham Vora
Updated on 06-Dec-2022 6K+ Views

In this tutorial, we will learn why using onClick() in HTML is a bad practice. There are events and methods in JavaScript to handle the actions like clicking, hovering, etc. The onClick() is the most used method that executes a function on clicking an element. This method is applied to the element as its attribute. It may contain the name of the function or the script itself. JavaScript also contains the addEventListener method used to execute a function on the occurrence of an event. There are many ways to execute events, and every way has advantages and disadvantages. ...

Read More

How to fix broken images automatically in jQuery?

Shubham Vora
Shubham Vora
Updated on 21-Nov-2022 2K+ Views

In this tutorial, we will learn to fix broken images automatically in jQuery. Have you ever seen broken images while wondering on any website which shows only alternative text with the default icon of the broken image? Don’t you think it is a bad user experience? Obviously, it is. So, when you develop the application or website, you should write some JavaScript or jQuery code such that it can automatically replace broken images. Here, we will learn 2 to 3 different methods to fix broken images automatically using jQuery. Use the ‘onerror’ event inside the HTML ‘ ’ tag ...

Read More

How to iterate a JavaScript object's properties using jQuery?

Lokesh Badavath
Lokesh Badavath
Updated on 18-Nov-2022 2K+ Views

In this article, we are going to learn how to iterate a JavaScript object’s properties using jQuery. The simplest way to iterate over an object with JavaScript is to use a for in loop. The for statement will iterate over the objects as an array, but the loop will send the key to the object instead of an index as a parameter. This loop is used to iterate over all non-Symbol iterative properties of an object. The hasOwnProperty() method can be used to check if the property belongs to the object itself. The value of each key of the ...

Read More

Can scripts be inserted with innerHTML?

Shubham Vora
Shubham Vora
Updated on 10-Nov-2022 9K+ Views

In this tutorial, we will learn that can scripts are inserted with innerHTML. There are various properties in JavaScript that help in working with the HTML of the current page. The innerHTML property in JavaScript is used to add the Html to the element. It also returns the content present in an element. Scripts are the programs or codes of JavaScript that makes a webpage interactive and dynamic. We can add the script in the script tag on the same page or another JavaScript page linked with an HTML file. The HTML is inserted in the innerHTML property for an ...

Read More

What is the Arrow Function in ReactJS?

Payal Mittal
Payal Mittal
Updated on 07-Nov-2022 20K+ Views

React is a popular JavaScript library used to build user interface components. One of the features of React is that it allows you to use arrow functions to define React components. You may now create components using both the standard JavaScript function and the arrow function syntax, thanks to the release of ES6 arrow function syntax. Lets discuss what arrow functions are and why you should use them in your ReactJS code − About Arrow Functions The arrow function is a new feature of ES6, introduced in ReactJS 16. It allows the developer to create a function that has lexical ...

Read More

What is Prettier in React?

Payal Mittal
Payal Mittal
Updated on 07-Nov-2022 1K+ Views

One of the many amazing things about React is that it’s more visually appealing than traditional web development frameworks like AngularJS. This might be because React favors a "simple" and "elastic" design over complex directives and components. Other factors contributing to React's visual appeal are the use of stateless components and declarative rendering. This means that instead of specifying how each component should look, you simply specify what data it needs and React will take care of the rest. In the end, it really depends on your personal taste − some people might prefer AngularJS' more polished look, while others ...

Read More

What is DOM in React?

Payal Mittal
Payal Mittal
Updated on 07-Nov-2022 4K+ Views

DOM stands for ‘Documents Object Model’. It’s the World Wide Web Consortium's fundamental logical homepage model. Every time the UI state of an application changes, the DOM is updated to reflect the change. Whenever the application user interface is updated, the DOM is rendered which ultimately impacts the application performance, resulting in slower loading. The complexity of the DOM and the numerous UI components further depletes the performance because each change necessitates a new rendering of the page. However, the virtual DOM concept in React has changed everything. Let’s see below − What is DOM? To put it another way, ...

Read More

What is a Single Page Application?

Payal Mittal
Payal Mittal
Updated on 07-Nov-2022 1K+ Views

Single Page Applications or SPAs are beginning to rule the IT marketplace now. (And for good reasons!) They are incredibly fast and render an amazing user experience. But what makes them faster? Well, the reason is that the SPAs enable the users to navigate through several pages without having to refresh the page. As the single page applications dynamically rewrite the web page content from the server, they do not load the entire web page after every render. This way, the web pages potentially improvise the performance by creating a more dynamic user experience. Let’s learn about the ...

Read More

How does React work?

Payal Mittal
Payal Mittal
Updated on 07-Nov-2022 809 Views

The front−end development ecosystem is constantly changing. It is getting harder for business owners to choose the finest library or framework from the many available since new tools are released daily. Speaking of frontend, React.js have been setting records in the web development industry for some time and doing splendidly despite having huge competition. Why is it so? How is it that react has been able to rule the IT industry while other libraries are still struggling? We’ll get all these answers in this blog. So, let’s dive in − What is React.js? React is an open−source, front−end JavaScript library, ...

Read More
Showing 6361–6370 of 6,519 articles
« Prev 1 635 636 637 638 639 652 Next »
Advertisements