Use JavaScript to dynamically display the table and change the value of the key

Source: Internet
Author: User
Tags tagname

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.