conditional display of html element forms

前端 未结 3 921
滥情空心
滥情空心 2020-12-16 01:18

Well, after a one hour introduction to javascript, I ve come up with the following code. It did what I wanted alright, but then I wanted something else and it wont work.

3条回答
  •  情书的邮戳
    2020-12-16 01:35

    This line:

    document.getElementById("cont1").style.visibility="hidden";
    

    Adds this:

    style="visibility: hidden;"
    

    to this:

    to make it look like this:

    You can do this yourself, just by adding that attribute to your html tag.


    Oh yeah, and this:

    is the same as this:

提交回复
热议问题