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
Javascript Articles - Page 574 of 671
367 Views
In this tutorial, we will learn how to set the width of the left border with JavaScript. The border property specifies the boundary of an element. It specifies the border style, border-color values, and also border-width. One, two, or three of the values can be used to specify the border attribute. The sequence of the values is irrelevant. The border shorthand comes in handy when you want all four borders to be the same. To differentiate them, employ the longhand border-color, and other attributes like border style and width, which take distinct values for each side. Alternatively, you may use ... Read More
706 Views
This tutorial will teach us how to convert the infinity to string in JavaScript. The Infinity is the reserved keyword in JavaScript and demonstrates the concept of the infinity number of mathematics. It is a global variable, and we can access it anywhere in our program. Here, we have two approaches to converting the infinity number to a string in JavaScript. Using the String() Constructor Using the toString() Method Using the String() Constructor The JavaScript contains the class for the variable of every data type and its related method. It also contains the string class and which is ... Read More
477 Views
In this tutorial, we will discover how to get the port number of the href attribute of an area in JavaScript. An area is a tag in JavaScript. This tag is written as . This tag denotes an area inside an image map. This tag has no closing tag. So in HTML, this is an empty tag. In XHTML, this tag must be closed correctly. An image map is also another tag. This tag is written as . An image map contains an image with clickable or active areas. The area tag comes inside the map tag. This tag ... Read More
497 Views
A number representing positive infinity is called infinity. -Infinity stands for the opposite of infinity. When a number exceeds its maximum value, it enters infinity: 1.797693134862315E+308. When an integer crosses its lower bound, it enters infinity: -1.797693134862316E+308. The universal object has the quality of infinity and is a variable with a global scope, in other words. The number is the beginning value of Infinity. A Boolean value in JavaScript may either be true or false. Users can use the Boolean function to know if something is "true" or "false". Booleans can be kept track of and modified over time by ... Read More
208 Views
To search the value of the type attribute of a link in JavaScript, use the type property. You can try to run the following code to get the value of type attribute.Example Qries var x = document.getElementById("qriesid").type; document.write("Value of the type attribute: "+x);
354 Views
To search the value of the target attribute of a link in JavaScript, use the target property. You can try to run the following code to get the value of target attribute.Example Qries var x = document.getElementById("qriesid").target; document.write("Value of the target attribute: "+x);
5K+ Views
In this tutorial, we will learn how we can get the coordinates of the mouse cursor relative to the screen with JavaScript. We will find the position of the cursor vertically (Y-axis) and Horizontally (X-axis) relative to the screen. JavaScript allows us to use two different properties to get the coordinates of the mouse cursor relative to the screen when the mouse button is pressed anywhere on the screen − Using the event.screenX Property Using the event.screenY Property Let us discuss both of them one by one with code examples. Using the event.screenX Property The event.screenX property is ... Read More
157 Views
Use window.outerWidth and window.outerHeight event in JavaScript to get the size of windows when the browser is resized.ExampleYou can try to run the following code to work with events to check the browser window size − function resizeFunction() { var val = "Window Width=" + window.outerWidth + ", Window Height=" + window.outerHeight; document.getElementById("test").innerHTML = val; } Resize browser window and check the window (browser window) height and width again.
19K+ Views
In this tutorial, we will learn how we can find the coordinates of the mouse cursor with JavaScript. We have to find out the X and Y-coordinates or we can say that the horizontal and the vertical position of the cursor on the screen with JavaScript. JavaScript provides us with two different properties to get the coordinates of the mouse cursor when the mouse button is pressed anywhere on the screen − Using event.clientX Property Using event.clientY Property Using event.clientX Property The event.clientX property is used to find out the value of the horizontal position or the X-coordinate ... Read More
