
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

312 Views
The largest possible value a number in JavaScript can have 1.7976931348623157E+308. The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with.ExampleYou can try to run the following code to get the maximum value represented by Number object −Live Demo Click the following to see the result:

2K+ Views
We can set cookies for a specific page only using JavaScript. We use the path attribute of the document.cookie property to set the cookie on a specific webpage. Cookies are small text files (4 KB) that store important information such as username, email, session id, and other preferences that help customize the webpage for a particular user. Something so trivial as this is a user preference and thus can be conveniently stored in a corresponding cookie file. The pathname property of the Window location returns a string containing the path of the current webpage. The path is basic information about ... Read More

269 Views
To lists down all the cookies by name, use the cookies pairs in an array. After that, you need to get the key value pair out of this array.ExampleYou can try to run the following code to list all the cookiesLive Demo click the following button and see the result:

4K+ Views
In this tutorial, we will learn about native objects in JavaScript. Native JavaScript objects are regular JavaScript objects offered by JavaScript itself. Inbuilt objects, pre-defined objects, and global objects are other names. No matter the computer or environment, all users have access to these objects, and they function similarly. They may be used as both constructors (like String(), Array(), and Object()) and primitive values since their functions are unaffected by changes to the machine or environment. An object in an ECMAScript implementation whose semantics are entirely determined by this specification as opposed to the host environment. Native objects are additionally ... Read More

7K+ Views
We use event handlers to simulate keypress events in JavaScript. An event in JavaScript, as the name suggests, refers to actions taken by the browser or user. An event handler is a utility that JavaScript provides, that lets the programmer implement the correct course of response to those events. We will be using the jQuery library to simulate keypress events in JavaScript. It is a library for JavaScript to traverse HTML documents as well as manipulate them, create animations, and much more. One such feature is event handling that we will be using. Event An Event is a change that ... Read More

6K+ Views
The with keyword is used as a kind of shorthand for referencing an object's properties or methods.The object specified as an argument to with becomes the default object for the duration of the block that follows. The properties and methods for the object can be used without naming the object.SyntaxThe syntax for with object is as follows −with (object){ properties used without the object name and dot }ExampleYou can try to learn the following code to learn how to implement with keyword −Live Demo User-defined objects ... Read More

2K+ Views
A secured cookie is a cookie that works with HTTP/HTTPS, known as a httpOnly cookie. These cookies are only used for HTTP requests, so unethical access though scripting is not possible. Therefore, cross-site scripting can be stopped, which in turn stops attacks.The secure attribute is always activated for secured cookies, so it is transmitted with encrypted connections, without any hassles and security issues. The httpOnly flag does not give cookie access to JavaScript or any non-HTTP methods. This is situated in the secure cookie header.The secure attribute and httpOnly flag ensure that the browser does not allow malicious scripts to ... Read More