单击时隐藏/取消隐藏文本的脚本 [英] Script for Hiding/Un-Hiding Text On Click
问题描述
您好,
我的网站上有一系列常见问题解答,所以
这里有一个问题和答案页面上有一个很长的列表。
任何人都可以推荐一个简单的脚本,允许我在页面加载时隐藏每个
的答案,但后来制作了它们单击
单击问题时出现/消失?
我正在解决一个如果一个页面不能正常降级的解决方案>
加载,即不像这个例子似乎没有显示答案
如果禁用JavaScript(当它实际显示所有内容时,如果
那里'不是JavaScript): http://www.virb.com/faq
感谢您对此提出的任何建议,
Ste
Hi there,
I''ve got a website with a list of Frequently Asked Questions, so
there''s a question and answer in a long list down the page.
Can anyone recommend a simple script that would allow me to hide each
answer when the page loaded, but then made them individually
appear/disappear when clicking the question?
I''m after a solution that will degrade gracefully if a page doesn''t
load, i.e. unlike this example which doesn''t seem to show the answers
if JavaScript is disabled (when it should actually show everything if
there''s no JavaScript): http://www.virb.com/faq
Thanks for any advice on this,
Ste
推荐答案
7月20日下午4:41,Ste< 6df ... @ 5dfg25.comwrote:
[snip]
On Jul 20, 4:41 pm, Ste <6df...@5dfg25.comwrote:
[snip]
我确实找到了jQuery和mootools的一些教程,但老实说,即使按照教程后,我也不能让它们工作!
I did find some tutorials for jQuery and mootools, but to be honest, I
couldn''t get these to work even after following the tutorials!
你当然不需要jquery或mootools。如果你不想知道JS,你应该在尝试之前先学习一下。
You certainly don''t need jquery or mootools for this. And if you
don''t know JS at all, you should learn a bit before attempting this.
Enréponse àDavidMark qui nousansusurré,en date du:24/07/07 3:23,
le message sibyllin suivant:
(很长的剪辑) )
En réponse à David Mark qui nous a susurré, en date du : 24/07/07 3:23,
le message sibyllin suivant :
(very long snip)
您是否也使用Netscape 4进行测试?
Did you test with Netscape 4 too?
因为它被称为优雅地降级,
是的我做了(NC 4.5)
和...一切都OK(gEBI)
....
of corse
-
Stephane Moriaux et son(moins)vieux Mac
Because it was said "gracefully degrade",
yes I did (NC 4.5)
and ... all OK with single if(gEBI)
....
of corse
--
Stephane Moriaux et son (moins) vieux Mac
" ASM" < st ********************* @ wanadoo.fr.invalidwrote in message
news:46 ******* **************** @ news.orange.fr ...
"ASM" <st*********************@wanadoo.fr.invalidwrote in message
news:46***********************@news.orange.fr...
EnréponseàDavidMark qui nousausururré ,日期du:24/07/07 3:23,
le message sibyllin suivant:
(很长的剪辑)
En réponse à David Mark qui nous a susurré, en date du : 24/07/07 3:23,
le message sibyllin suivant :
(very long snip)
>你也测试了Netscape 4吗?
>Did you test with Netscape 4 too?
因为它被称为优雅地降级,
是的我做了(NC 4.5)
和...一切都好单(如果)(gEBI)
...
的corse
Because it was said "gracefully degrade",
yes I did (NC 4.5)
and ... all OK with single if(gEBI)
...
of corse
对。我们的两个解决方案都适用于任何早于
getElementById的浏览器。具有讽刺意味的是,另一个发布的,据称是b $ b降级得更好,会破坏所有这些浏览器,包括NS4。
Right. Both of our solutions will work with any browser that predates
getElementById. Ironically, the other one posted, which purportedly
degraded better, would break all such browsers, including NS4.
这篇关于单击时隐藏/取消隐藏文本的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!