Forum discussion on JavaScript DOM and Events

Answer the question and discuss

Answer the question and discuss

by Md Assaduzzaman -
Number of replies: 20

How JavaScript DOM changes HTML code?

In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Nozrof Shahriar -
We can change Html Element,content,design by Javascript dom, In javascript code we can select the html code by document.getElementById(),document.getElementsByClassname(),document.getElementsByTagname(),document.queryselector() methods.After select we can change the content,create element,data manupulate,exchange the html code.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Rifat Rahman -
JavaScript DOM changes HTMl code by call them by
document.getElementById(),
document.getElementsByClassname(),
document.getElementsByTagname(),
document.queryselector()
After select we can change the content,create element,data manupulate,exchange the html code.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Hasibul Hassan -
In javascript code we can select the html code by document.getElementById(),document.getElementsByClassname(),document.getElementsByTagname(),document.queryselector() methods.After select we can change the content,create element,data manupulate,exchange the html code.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Abdul Hadi Hemal -
JavaScript can change all the HTML elements in the page
JavaScript can change all the HTML attributes in the page
JavaScript can change all the CSS styles in the page
JavaScript can remove existing HTML elements and attributes
JavaScript can add new HTML elements and attributes
JavaScript can react to all existing HTML events in the page
JavaScript can create new HTML events in the page
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Sharmila zaman -
JavaScript DOM changes HTML code by changing the content of HTML elements. The easiest way to modify the content of an HTML element is by using the innerHTML property.
To change the content of an HTML element, this syntax can be used:
document.getElementById(id).innerHTML = new HTML
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Rasel Hossain -
JavaScript can create dynamic HTML content:
document.write()
document.getElementById(),
x.getElementsByTagName(),
getElementsByClassName(),
document.querySelectorAll()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md. Sarowal -
JavaScript can change all the HTML elements in the page
JavaScript can change all the HTML attributes in the page
JavaScript can change all the CSS styles in the page
JavaScript can remove existing HTML elements and attributes
JavaScript can add new HTML elements and attributes
JavaScript can react to all existing HTML events in the page
JavaScript can create new HTML events in the page
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Jannatul Marjan -
The HTML DOM allows JavaScript to change the content of HTML elements.
document.getElementById(id).innerHTML = new HTML
document.getElementById(id).attribute = new value
document.getElementsByClassname(),
document.getElementsByTagname(),
document.queryselector()
After select we can change the content,create element,data manupulate,exchange the html code.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md. Monirul Islam -
JavaScript DOM can change HTML code by creating dynamic content, that means HTML element could be change by using JavaScript DOM, and the use the followings,
* document.getElementById(),
* document.getElementsByClassname(),
* document.getElementsByTagname(),
* document.queryselector()

by using the upper syntax JavaScript DOM can change HTML code
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Nahidul islam Nihal -
#JavaScript can change all the HTML elements in the page.
#JavaScript can change all the HTML attributes in the page.
#JavaScript can change all the CSS styles in the page.
#JavaScript can remove existing HTML elements and attributes.
#JavaScript can add new HTML elements and attributes.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Ahsan Habib -
Javascript has DOM(Document Object Model) which can easily get any element from HTML as an element and not only can change its content but also can create new element using different types of query Selector like:
1. getElementById();
2.getElementsByCLassName()
3.getElementsByTagname()
4.queryselector()
5.queryselectorAll()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Rakibul Hasan -
document.getElementById(),
document.getElementsByClassname(),
document.getElementsByTagname(),
document.queryselector()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Mehedi Hasan -
JavaScript can change all the HTML attributes in the page.
#JavaScript can change all the CSS styles in the page.
#JavaScript can remove existing HTML elements and attributes.
#JavaScript can add new HTML elements and attributes.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Sohana Tasmim -
#JavaScript DOM changes HTML code After select we can change the content, create elements, data manipulated, exchange the HTML code-
*document.getElementById(),
*document.getElementsByClassname(),
*document.getElementsByTagname(),
*document.queryselector()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Anaminni Akbar Rupa -
The HTML DOM allows JavaScript to change the content of HTML element.
document.write(),
document.getElementById(),
x.getElementsByTagName(),
getElementsByClassName(),
document.querySelectorAll()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by A. B. M. Mohiuddin -

The HTML DOM can be accessed with JavaScript (and with other programming languages).

In the DOM, all HTML elements are defined as objects.

The programming interface is the properties and methods of each object.

property is a value that you can get or set (like changing the content of an HTML element).

method is an action you can do (like add or deleting an HTML element).

In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Imran Hossan -
JavaScript DOM changes HTMl code by call them by
document.getElementById(),
document.getElementsByClassname(),
document.getElementsByTagname(),
document.queryselector()
After select we can change the content,create element,data manupulate,exchange the html code.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Raihan Islam Sonet_181-15-1983 -

JavaScript DOM changes HTMl code by call them by

  • document.getElementById(),
  • document.getElementsByClassname(),
  • document.getElementsByTagname(),
  • document.queryselector()
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Tanjir rahman -
JavaScript can change all the HTML elements in the page
JavaScript can change all the HTML attributes in the page
JavaScript can change all the CSS styles in the page
JavaScript can remove existing HTML elements and attributes
JavaScript can add new HTML elements and attributes
JavaScript can react to all existing HTML events in the page
JavaScript can create new HTML events in the page
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md.Iftakher Alam -
Javascript has DOM(Document Object Model) which can easily get any element from HTML as an element and not only can change its content but also can create new element using different types of query Selector like:
1. getElementById();
2.getElementsByCLassName()
3.getElementsByTagname()
4.queryselector()
5.queryselectorAll()