
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 8591 Articles for Front End Technology

11K+ Views
We use the selectedIndex property in JavaScript to show the index of the selected option in a dropdown list. We use the id of the dropdown list to access the element using JavaScript and then call selectedIndex on it to get the index of the selected option in the dropdown list. Dropdown lists are an important part of user interface utility. It is a list of options from which one or multiple options can be selected by the user. These responses to these dropdown lists are then collected and the required course of action is taken by the user. A ... Read More

10K+ Views
This tutorial will show different ways to get the number of options in the drop-down list with JavaScript. While filling out any form online, users have to add unique information using the input method. However, the options they get in the drop-down list are already determined. Since there can be limited options mentioned in the drop-down, you might have to check the number using JavaScript. Using options.length method to get the number of drop-down options One of the simple ways to get access to the list of options is to get the list by its Id. We will use a ... Read More

11K+ Views
In this tutorial, we are going to learn how to select multiple options in a dropdown list with JavaScript. Basically, we are going to make two buttons, one is a drop-down button in which we provide more than one option, and another is a normal button connected to the multiFunc() function with an id of the dropdown button, when we click this button then we are able to select multiple options in the drop-down button. In this tutorial we are using two properties of JavaScript one is DOM property i.e. document.getElementById and another one is multiple properties use to choose ... Read More

10K+ Views
In this tutorial, we will discuss different approaches to find the text visible on the button with JavaScript. The text on a button shows what will happen if you click the button. To extract the text on the button, JavaScript provides us with the following two properties. Using the innerHTML Property Using the innerText Property Let us discuss both of the above properties in detail. Using the innerHTML Property The innerHTML property not only allows us to get the text inside any tag but also allows us to set the text to any tag. This property also allows ... Read More

5K+ Views
In this tutorial, we will learn how we can find the id of the form element to which a button belongs using JavaScript. In HTML, we can use button tag in two ways with form tag, where it can be used to perform some activity in the form when it is clicked, as listed below − Button is inside the FORM tag Button is outside the FORM tag No matter where the button is located, whether it is inside or outside, we can find the ID of the form tag to which the button belongs using JavaScript. Let ... Read More

837 Views
To convert string to number in JavaScript, it helps user to perform accurate mathematical operations, comparisons and handling form inputs. We will be discussing various approaches with example codes for each approach to convert string to number in JavaScript. In this article, we are having a string value, our task is to convert string to number in JavaScript. Approaches to Convert String to Number in JavaScript Here is a list of approaches to convert string to number in JavaScript which we will be discussing in this article with stepwise explaination and complete example codes. ... Read More

3K+ Views
In this tutorial, we will learn how we can use JavaScript to replace the content of a HTML document. In JavaScript, we can change the content of HTML document with a combination of following methods − open − The open method is used to open a new document which takes two arguments as text/html and replace, where first argument will define the type of new document to be formed and the later one will replace all the adds history on the previous page and help to open new document with ease. document.open("text/html", "replace"); write − After creating ... Read More

4K+ Views
This tutorial will teach us to convert the number to string in JavaScript. Changing the type of variable is called the type conversion of a variable. While coding, the programmer needs to deal with the different data types and might need to convert the variable's data type. Every programming language has different methods to convert one variable from one data type to another data type, and JavaScript also has some methods, which are explained below. Using the toString() Method Concatenating with an empty String Using the string() Constructor Using the toString() Method In JavaScript, the toString() method is ... Read More

2K+ Views
We use the URL property of the document object to show the full URL of a document with JavaScript. The document object, part of the DOM, corresponds to the current web page that the browser has loaded. It Contains all the information about the condition of the browser as well as the web page. It can be visualized as a hierarchy that is obtained after rendering the HTML structure of the web page. URL stands for Uniform Resource Locator. It contains the address of a resource on the internet. A Typical URL looks something like this− http://www.example.com/index.html It is ... Read More

5K+ Views
We use the lastModified property of the document object to show the date and time the document was last modified with JavaScript. This command will provide the exact date and time of modification. The document object, part of the DOM, renders the whole HTML as a hierarchy of objects and their properties as well as stores different attributes of the webpage. document.lastModified It is a read-only property of the document object that returns a string containing the date and time, the document was last modified. The format looks something this: 07/29/2019 15:19:41 Note − The lastModified property is useful ... Read More