Tutorials using JS
Find Elements
Document Interface
- document.anchors – get anchor tag elements in document
- document.body – get innerHTML of body element in document
- document.documentElement – get content in document
- document.embeds – get
<embed>
elements in the document - document.forms
- document.head
- document.images
- document.links
- document.scripts
- document.title
Cookies
Paragraph
- create a new paragraph element using JavaScript
- change text of a paragraph using JavaScript
- change background color of a paragraph using JavaScript
- change border for a paragraph using JavaScript
- change text color of a paragraph using JavaScript
- change width of a paragraph using JavaScript
- get number of characters in a paragraph using JavaScript
- hide a paragraph using JavaScript
- remove a paragraph using JavaScript
Div
- add classname to existing classnames of div using JavaScript
- check if div contains a specific element using Javascript
- change width of a div using JavaScript
- change height of a div using JavaScript
- change background color of a div using JavaScript
- change border of a div using JavaScript
- change border color of a div using JavaScript
- change shadow of a div using JavaScript
- delete first child of a div using JavaScript
- delete last child of a div using JavaScript
- get classnames of div using JavaScript
- get children of div using JavaScript
- get height of div using JavaScript
- get inner HTML of div using JavaScript
- get width of a div using JavaScript
- hide a div using JavaScript
- iterate over classnames of a div using JavaScript
- iterate over children of div using JavaScript
- remove classname from existing classnames of div using JavaScript
- remove a div using JavaScript
- set inner HTML of a div using JavaScript
- set onclick listener for a div using JavaScript
Links
- change all links to no-follow using JavaScript
- change URL of link using JavaScript
- change text of link using JavaScript
- hide a link using JavaScript
- hide all links in the page using JavaScript
- remove a link using JavaScript
- remove all links using JavaScript
- replace links with text using JavaScript
- set all links to open in a new tab using JavaScript
Lists
- add list-item to list element in document using JavaScript
- get all the items (li) in a list using JavaScript
- hide list element in document using JavaScript
- remove first list-item from list element in document using JavaScript
- remove last list-item from list element in document using JavaScript
- convert ordered list to unordered list using JavaScript
- convert unordered list to ordered list using JavaScript