Tutorialspoint

What is importance of startsWith() method in JavaScript?

vineeth.mariserla
Answered 1d 12h ago

To know Whether a string starts with a particular character or a string indexOf() method is used. But in the advanced applications, this method is obsolete. So, ES6 has provided us with startsWith() method to perform those advanced tasks.In the following example, the IndexOf() method is used to find whether ... Read More

How to display the different font items inside a JComboBox in Java?

raja ramesh
Answered 1d 13h ago

A JComboBox is a subclass of JComponent class and it is a combination of a text field and a drop-down list from which the user can choose a value. A JComboBox can generate an ActionListener, ChangeListener, and ItemListener interfaces when the user actions on a combo box. We can display the different font styles inside ... Read More

HTML DOM removeAttributeNode() Method

AmitDiwan
Answered 1d 13h ago

The HTML DOM removeAttributeNode() method removes the attribute specified in its parameter from the specified element in an HTML document and return the removed attribute as an Attr Node Object.SyntaxFollowing is the syntax −node.removeAttributeNode(attributeNode);ExampleLet us see an example of removeAttributeNode() method − Live Demo<!DOCTYPE html> <html> <head> <style>    html{   ... Read More

HTML DOM removeAttribute() Method

AmitDiwan
Answered 1d 13h ago

The HTML DOM removeAttribute() method removes the attribute specified in its parameter from the specified element in an HTML document.SyntaxFollowing is the syntax −node.removeAttribute(attributeName);ExampleLet us see an example of removeAttribute() method − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{       ... Read More

HTML DOM scripts Collection

AmitDiwan
Answered 1d 13h ago

The HTML DOM Script collection returns the collection of all <script> elements of an HTML document.SyntaxFollowing is the syntax −document.scriptsProperty of script objectPropertyExplanationlengthIt returns the number of <script> element in the collection in a HTML document.Methods of script objectMethodExplanation[index]It returns the specified index <script> element from the collection.item(index)It returns the ... Read More

HTML DOM Pre Object

AmitDiwan
Answered 1d 13h ago

The HTML DOM Pre Object represent the <pre> element of an HTML document.Create pre objectSyntaxFollowing is the syntax:document.createElement(“PRE”);ExampleLet us see an example of pre object − Live Demo<!DOCTYPE html> <html> <head> <style>    body{       text-align:center;       background-color:#fff;       color:#0197F6;    }    h1{   ... Read More

HTML DOM removeChild() Method

AmitDiwan
Answered 1d 13h ago

The DOM removeChild() method returns and remove the specified child node of the specified node in an HTML document.SyntaxFollowing is the syntax −node.removeChild(node);ExampleLet us see an example of removeChild() method − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{       text-align:center; ... Read More

HTML DOM previousElementSibling Property

AmitDiwan
Answered 1d 14h ago

The HTML DOM previousElementSibling property returns the previous element in the same tree level of the specified element in an HTML document.SyntaxFollowing is the syntax −node.previousElementSiblingExampleLet us see an example of previousElementSibling property − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{   ... Read More

HTML DOM previousSibling Property

AmitDiwan
Answered 1d 14h ago

The DOM previousSibling property returns the previous node in the same tree level of the specified node in an HTML document.SyntaxFollowing is the syntax −node.previousSiblingExampleLet us see an example of previousSibling property − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{     ... Read More

How to remove existing HTML elements in JavaScript?

vineeth.mariserla
Answered 1d 14h ago

To remove an existing HTML element removeChild() must be used. It removes any element from the parent element. syntaxremoveChild(element);It takes an element as a parameter and eliminates it from the DOM.ExampleIn the following example, in the div section initially we have 2 texts. But when removeChild() method is used one of ... Read More

How to set a tooltip text for each item of a JList in Java?

raja ramesh
Answered 1d 14h ago

A JList is a subclass of JComponent class and it can be used to display a list of objects that allows the user to select one or more items. A JList can generate a ListSelectiionListener interface and need to implement the abstract method valueChanged(). A JToolTip class is used to display a text or a ... Read More

HTML DOM PopStateEvent Object

AmitDiwan
Answered 1d 14h ago

The HTML DOM popStateEvent object is an event handler for the popstate event which occurs when window’s history changes.Property of PopStateEventPropertyExplanationstateIt returns an object that represents a copy of the history entries.ExampleLet us see an example of HTML DOM popStateEvent Object − Live Demo<!DOCTYPE html> <html> <head> <style>    html{   ... Read More

HTML DOM parentNode Property

AmitDiwan
Answered 1d 14h ago

The HTML DOM parentNode property returns the parent node object of the specified node in an HTML document.SyntaxFollowing is the syntax −node.parentNodeExampleLet us see an example of parentNode property − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{       text-align:center;   ... Read More

HTML DOM parentElement Property

AmitDiwan
Answered 1d 14h ago

The DOM parentElement property returns the parent element of the specified element in an HTML document.SyntaxFollowing is the syntax −node.parentElementExampleLet us see an example of parentElement property − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{       text-align:center;       ... Read More

HTML DOM querySelectorAll() Method

AmitDiwan
Answered 1d 14h ago

The HTML DOM querySelectorAll() method returns all elements that matches a specific CSS selector specified in its parameter in an HTML document.SyntaxFollowing is the syntax −document.querySelectorAll(“CSS Selector”);ExampleLet us see an example of querySelectorAll() method − Live Demo<!DOCTYPE html> <html> <head> <style>    html{       height:100%;    }    body{ ... Read More

1 2 3 4 5 6 7 ... 1507 Next
Advertisements
Loading...
Unanswered Questions View All

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.