问题描述
您好我有这个演示:
我试图一次只显示1个Div,而不是全部三个。我想要它,因此某个div只会在按下itss按钮时才显示。
正如您所看到的,它显示了所有Div的开始。按钮工作正常。
问题:如何从一开始就隐藏Div 2和Div 3?
ID和NAME标记必须以字母([A-Za-z])开头。 ([0-9]),连字符( - ),下划线(_),冒号(:)和句号(。)。 (W3C)
Hi I have this Demo: http://jsfiddle.net/SO_AMK/BcFVv/
I am trying to show only 1 Div at a time instead of all three. I want it so a certain div will only show when itss button is pressed.
As you can see it shows all of the Divs at the start. The buttons work fine.
QUESTION: How do I hide Divs 2 and 3 from the start?
ID's should be named with a leading letter before the digit.
"ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")." (W3C)
这篇关于隐藏/显示Div(jQuery)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!