
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6710 Articles for Javascript

171 Views
To remove a property from a JavaScript object, use the delete keyword. You can try to run the following code to learn how to remove a propertyExampleLive Demo var cricketer = { name:"Amit", rank:1, points: 150 }; delete cricketer.rank; document.getElementById("demo").innerHTML = cricketer.name + " has " + cricketer.rank + " rank.";

568 Views
The window.location object can be used to get the current URL.window.location.href returns the href(URL) of the current page.I am using these code in my MVC projet.Example var iid=document.getElementById("dd"); alert(window.location.href); iid.innerHTML = "URL is" + window.location.href;

13K+ Views
Suppose you are building a web app that manages the data of daily tasks, the user inserts the task and a list of tasks gets formed. But at some point in time, the user wants to remove all the tasks from the list and wants to make the list empty. So, as a developer, you should know how to remove all the child elements from the DOM node. To remove all the elements from the DOM node we have the following approaches. By iterating the DOM nodes and using the removeChild method. By Erasing the innerHTML value to a ... Read More

2K+ Views
Let us first understand what is JavaScript objects and JavaScript events. An object in JavaScript is a distinct entity having properties and a type. For an instance, contrast it with a bowl. A bowl is an object with some properties. The properties are design, color, material, weight, etc. Like this, JavaScript object also has some properties. An independent entity known as a JavaScript object can store numerous values as its properties and methods. While a method represents a function, an object property maintains a literal value. Either the object literal or the object function object() { [native code] } syntax ... Read More

3K+ Views
In this article, we will learn to delete a row from a table using jQuery. jQuery, a fast and lightweight JavaScript library, Deleting a row from a table dynamically is a common requirement in web development, especially when working with forms or data tables. Deleting a Row Using jQuery The approach involves attaching a click event listener to a delete button (or any element) within the row. When the button is clicked, the corresponding row is removed from the table. Following are the steps for jQuery Script for deleting a row from a table using jQuery− ... Read More

3K+ Views
In this article, we will learn to add a new list element under a "" using jQuery. jQuery is a popular JavaScript library that simplifies HTML manipulation, event handling, and animations. One of its practical applications is dynamically adding elements to a webpage without requiring a full page reload. Why Use jQuery? DOM (Document Object Model) updating using basic JavaScript might become difficult and needs more than one line of code. jQuery has simplified it through easy selectors and functions. Employing jQuery helps us − Select elements efficiently. Handle events seamlessly. ... Read More

923 Views
In this article, we will learn to globally disable an animation using jQuery. In jQuery, animations are commonly used to create smooth transitions and effects. However, there might be scenarios where you want to disable animations globally, such as improving performance on low-powered devices or creating an instant response for user interactions. Using jQuery.fx.off to Disable Animations To globally disable an animation using jQuery, use the jQuery.fx.off() method, which can be set to true to disable all animations and effects. When this property is enabled, jQuery methods like .animate(), .fadeIn(), .fadeOut(), and .slideToggle() execute instantly without any animation. To enable ... Read More

586 Views
To add easing effect to your animation, use the animation speed properly to form it a perfect animation for the web page. Do not speed up animation and you should know where to stop it while using animate().Here for our example, we have a button that takes you to a textarea to add an answer: Add answer Now set the fade out property properly to set easing effect.Example Live Demo $(document).ready(function(){ $('body').on('click', '#answer', function() { var container = $('.new-answer'); ... Read More

2K+ Views
Both JavaScript and jQuery serve the same overarching objective of making the webpages more interactive and dynamic. They give the websites a sense of vibrancy. People may ask why there is a need for two distinct ideas if they serve the same function and are utilised in the same way. Read through this article to find out how jQuery differs from JavaScript.What is JavaScript?JavaScript is a lightweight programming language that is used most often as a component of webpages. Its webpage implementations enable client-side script to interact with the user and create dynamic sites. It is a programming language that ... Read More

10K+ Views
In this tutorial, we will learn how to handle bind an event using JavaScript. Events are the actions or occurrences in the system by the browser or users. There are various types of events that represent various activities performed by the browser or users. For example, if a user clicks on a button, it triggers an event named "click." Similarly, if a webpage finished loading, it triggered an event called "load." An Event Listener is a program that continuously listens to or waits for an event to occur. It is one of the most important parts of JavaScript. The ... Read More