Vikyath Ram has Published 173 Answers

How to parse JSON object in JavaScript?

Vikyath Ram

Vikyath Ram

Updated on 12-Jun-2020 11:28:10

ExampleTo parse JSON object in JavaScript, implement the following code −<!DOCTYPE html> <html>    <body>       <script>          myData = JSON.parse('{"event1":{"title":"Employment period", "start":"12\/29\/2011 10:20 ", "end":"12\/15\/2013 00:00 "}, "event2":{"title":"Employment period", "start":"12\/14\/2011 10:20 ", "end":"12\/18\/2013 00:00 "}}')          myArray = []     ... Read More

What is nodeValue property in JavaScript HTML DOM?

Vikyath Ram

Vikyath Ram

Updated on 22-May-2020 11:15:51

The nodeValue property is used to get the node value. You need to specify the node.ExampleYou can try to run the following code to learn how to get nodeValue property.Live Demo<!DOCTYPE html> <html>    <body>       <p>Get the node value</p>       <button>Demo Button Text</button>     ... Read More

How to search the value of the href attribute of a link in JavaScript?

Vikyath Ram

Vikyath Ram

Updated on 20-May-2020 09:05:00

To get the value of the href attribute of a link in JavaScript, use the href property. It gives you the URL of the linked document in JavaScript.ExampleYou can try to run the following code to get the value of the href attribute of a link.Live Demo<!DOCTYPE html> <html>   ... Read More

Are HTML comments inside script tags a best practice?

Vikyath Ram

Vikyath Ram

Updated on 12-Mar-2020 11:34:56

JavaScript can be implemented using JavaScript statements that are placed within the <script>... </script></script>.    <script ...>    JavaScript code </script>ExampleHTML comment is added in the <script> tag, which is optional −Live Demo<html>    <body>       <script>          <!--             ... Read More

What are private, public, default and protected access Java modifiers?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 12:28:02

The access specifiers are used to define the access restriction on the class and members of a class.The private access modifier is the most restrictive access level. Class and interfaces cannot be private. Members that are declared private can be accessed outside the class.The public access modifier can be associated with class, ... Read More

What is the difference between a StringBuffer and StringBuilder in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 12:25:18

The StringBuffer and StringBuilder classes are used when there is a necessity to make a lot of modifications to Strings of characters.Unlike Strings, objects of type StringBuffer and String builder can be modified over and over again without leaving behind a lot of new unused objects.The StringBuilder class was introduced as of ... Read More

What does the method int capacity() do in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 10:06:15

The capacity() method is used to return the current capacity of a vector. Capacity is the length of the array kept in the vector.Exampleimport java.util.Vector; public class VectorDemo {    public static void main(String[] args) {       Vector<Integer> vec = new Vector<Integer>();       vec.add(14);     ... Read More

What does the method empty() do in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 10:00:29

The empty() method is used to test if this stack is or not.Exampleimport java.util.*; public class StackDemo {    public static void main(String args[]) {           Stack st = new Stack();       st.push("Java");       st.push("Source");       st.push("code");       ... Read More

How to limit input text length using CSS3?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 07:28:19

With HTML, you can easily limit input length. However, with CSS3, it will not be possible, since CSS can’t be used to limit the number of input characters. This will cause a functional restriction.CSS deals with presentation i.e. how your web page will look. This is done with HTML attribute ... Read More

Does a favicon have to be 32x32 or 16x16?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 06:44:30

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with a smaller size. The size of a favicon is 16x16, since it also gets displayed next to the URL of your site in a browser's address bar.The ... Read More

Previous 1 ... 5 6 7 8 9 10 11 ... 18 Next
Advertisements