×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Jennifer Nicholas
has Published
363
Answers
Encapsulation in Java
Java 8
Object Oriented Programming
Programming
Jennifer Nicholas
Published on 06-Feb-2018 11:02:51
Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction.Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from ...
Read More
How to convert a String containing Scientific Notation to correct JavaScript number format?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 02-Feb-2018 10:28:25
To convert a string with Scientific Notation, use the Number function. Pass the value to this function.ExampleYou can try to run the following code to convert a string to correct number format −Live Demo<!DOCTYPE html> <html> <body> <script> document.write("String with Scientific Notation ...
Read More
How to calculate the difference between two dates in JavaScript?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 01-Feb-2018 16:32:57
To get dates in JavaScript, use the getTime() method. Forgetting the difference between two dates, calculate the difference between date and time.ExampleYou can try to run the following code to learn how to calculate a difference between two dates −Live Demo<!DOCTYPE html> <html> <body> <script> ...
Read More
How to create JavaScript objects using object() constructor?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 01-Feb-2018 15:32:50
A constructor is a function that creates and initializes an object. JavaScript provides a special constructor function called Object() to build the object. The return value of the Object() constructor is assigned to a variable.The variable contains a reference to the new object. The properties assigned to the object are ...
Read More
How I can change the style of alert box using JavaScript?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 01-Feb-2018 12:19:59
You will not be able to change the style of a standard alert box in JavaScript. To change the style, use the following custom alert box. We’re using JavaScript library, jQuery to achive this.ExampleLive Demo<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script> ...
Read More
How to show hyperlinks in JavaScript alert?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 31-Jan-2018 18:10:15
Displaying hyperlinks in an alert box in JavaScript is not possible. To show links, use a custom alert box. With a dialog alert widget, you can achieve the following:For more on this, refer to the source code for Dialog Alert Widget.
How to use JavaScript to load a webpage after 5 seconds?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 31-Jan-2018 15:32:38
Use the setTimeout() function in JavaScript to load a webpage after some interval. This function waits for some seconds and then loads the web page.ExampleYou can try to run the following code to learn how to load a webpage after 5 seconds −Live Demo<!DOCTYPE html> <html> <body> ...
Read More
How to use JavaScript to set cookies for a specific page only?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 30-Jan-2018 16:11:16
To set cookies for a specific page, you need to use the “window.location.pathname” property. The property returns the path and filename of the current page.ExampleYou can try to run the following code to implement cookies for a specific page −Live Demo<html> <head> <script> ...
Read More
How to detect that JavaScript Cookies are disabled?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 30-Jan-2018 14:07:34
The “navigator.cookieEnabled” object is used to detect whether JavaScript cookies are disabled are not. You can try the following code snippet and check for cookies −if (navigator.cookieEnabled) { document.write("Cookies Enabled"); } else { document.write("Oops Cookies Not Enabled"); }
Read More
How do I declare a namespace in JavaScript?
Javascript
Web Development
Front End Technology
Jennifer Nicholas
Published on 29-Jan-2018 11:04:57
JavaScript uses the var keyword to declare a namespace.To declare a namespace in JavaScript, you can try to follow the below syntax −var myNamespace = { functionOne: function() { }, functionTwo: function() { } }; ... myNamespace. functionOne();
Previous
1
...
31
32
33
34
35
36
37
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout