The inserted code does not conform to the HTML5 style, only to realize the ability to dynamically display the table using JS, and the value of the key will change at the same time.
1 <!DOCTYPE>2 <HTML>3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />5 </Head>6 <Body>7 <Tablewidth= "760"Border= "0"cellspacing= "0"cellpadding= "0">8 <TR>9 <TDbgcolor= "#00CCFF">222</TD>Ten <TDbgcolor= "#00CCFF">333</TD> One <TDbgcolor= "#00CCFF">444</TD> A </TR> - <TR> - <TDbgcolor= "#00CCFF">555</TD> the <TDbgcolor= "#00CCFF">666</TD> - <TDbgcolor= "#00CCFF">777</TD> - </TR> - </Table> + - + <formname= "Form1" > A <inputname= "OK"type= "button"ID= "OK"value= "Display"onclick= "History_data (' DIVC ');" /> at - <TableID= "DIVC"width= "760"Border= "0"cellspacing= "0"cellpadding= "0"style= "Display:none"> - <TR> - <TDbgcolor= "#9966FF">Table2 222</TD> - <TDbgcolor= "#9966FF">Table2 333</TD> - <TDbgcolor= "#9966FF">Table2 444</TD> in </TR> - <TR> to <TDbgcolor= "#9966FF">Table2 555</TD> + <TDbgcolor= "#9966FF">Table2 666</TD> - <TDbgcolor= "#9966FF">Table2 777</TD> the </TR> * </Table> $ </form>Panax Notoginseng - <Script> the functionHistory_data (TagName) { + varobj=document.getElementById (TagName); A if(Document.form1.ok.value=="Show") the { + Document.form1.ok.value="Hidden"; - Obj.style.display= ""; $ } $ Else - { - Document.form1.ok.value="Show"; the Obj.style.display= "None"; - }Wuyi } the </Script> - Wu </Body> - </HTML>
Use JavaScript to dynamically display the table and change the value of the key