Java Web notes: use Javascript to operate DOM and javascriptdom
In HTML, because it uses the markup language, you can use Javascript to operate the DOM in HTML.
Using DOM parsing in Javascript defines a common button in the form. When you click this button, the show function is called to obtain the info element in the show function, and set the display content.
<Html xmlns = "http://www.w3.org/1999/xhtml">
Use DOM to generate a drop-down list box. In the setFun method, use document. getElementById ("area") obtains the object in the area drop-down list box. Then, you can select only one drop-down list box through length setting and set the first option to the default one. There are multiple options in the drop-down list. Therefore, you can use the setArrribute () method to set the value attribute content contained in each option, and set a text node in each option to indicate the displayed content, add each element to the drop-down list.
<Html xmlns = "http://www.w3.org/1999/xhtml">
Dynamically add and delete tables
<Html>