点击问题时显示隐藏的答案? [英] Showing hidden answer when question clicked?

查看:60
本文介绍了点击问题时显示隐藏的答案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用Google搜索了,但找不到我需要的东西,也许我说错了

问题!


我想要一个& ; FAQ"在网站上的页面,我讨厌那些滚动你的网页

答案所以我认为这样做的好方法就是拥有

隐藏的内容每个问题,类似这样的东西[

括号中的文字应该在点击问题时出现]:


字母表中的第一个字母是什么?

[字母表的第一个字母是A]


什么是5 + 5?

[5 + 5是10]


我想加载每个答案,所以它会立即出现,并且

理想情况下我会很容易编辑。


有什么建议吗?

-

Nigel M


" ;时间可能是一个伟大的治疗师,

但他是一个糟糕的美容师

解决方案

Nigel Molesworth< re ***@thegroup.com>写道:

我用Google搜索,但找不到我需要的东西,也许我问了错误的问题!


也许提出或回答相同问题的人也使用了

X-No-Archive:是标题。这是否给出了线索​​?


实际上,这个问题经常被问到,并且它确实不是关于HTML的问题,所以我写了一个简短的回答,并通过电子邮件发送

到你的邮件的From字段中的地址(它有一个回复

字段,但它在语法上是格式错误的) 。


D

o
$ b $

s


t

h

i

s


g

i

$
$ b $

a


c

l

u
$ b $




好​​的,好的,我今天非常好,所以尽管你有破坏性的Usenet

行为我会提供更多线索:

我想要一个常见问题解答页面在网站上,


罚款。使用纯HTML创建它,如果你想要一些额外的糖,请在合适的组中询问(也许是comp.lang.javascript)。不要忘记

发布网址。

我讨厌滚动你到答案的页面


如果你的个人不喜欢这么多,你不准备

成为(有用的)常见问题的作者。


此外,使用链接,卢克。您可以轻松地创建一个问题列表,

使它们成为答案的链接,在同一页面上(当然会重复问题
),或者在不同的页面上(通常一个好主意,如果

的答案很长,也许还有插图等等。)

所以我认为这样做的好方法是
每个问题都有隐藏的内容,


这是个错误的想法。

字母表的第一个字母是什么?
[第一个字母字母表是A]


在某些情况下,将简单,强大和有用的链接概念与一个有用的链接概念结合起来可能是有意义的。咨询可选的快速回答使用

title属性(或某些JavaScript或DHTML技术)。例如:


....

< li>< a href =" first.html" title =

"字母表的第一个字母是& quot; A& quot;。它来自......字母表中的第一个字母是什么?< / a>< / li>



....

其中first.html重复问题和简短答案,然后

继续解释A如何A。来自希腊字母alpha,在

转等等。


-

Yucca, http://www.cs.tut.fi/~jkorpela/

有关网页制作的网页: http:// www。 cs.tut.fi/~jkorpela/www.html


在comp.infosystems中。 www.authoring.html ,Jukka K. Korpela写道:

实际上,问题一直存在这么经常问,并且它真的不是关于HTML的,所以我写了一个简短的答案并通过电子邮件发送到你邮件的From字段中的地址(它有一个回复) -To
字段,但它在语法上是格式错误的。)




好​​吧,除了fuckwit,还有人有建议吗?

-

Nigel M


&quo t;时间可能是一个伟大的治疗师,

但他是一个糟糕的美容师


Jukka K. Korpela写道:

Nigel Molesworth< re *** @ thegroup.com>写道:

我用谷歌搜索,但找不到我需要的东西,也许我问了错误的问题!
也许有人问过或者回答相同的问题也使用了
X-No-Archive:是标题。这是否提供了线索?

实际上,这个问题经常被问到,而且它实际上并不是关于HTML的,所以我写了一个简短的答案并通过E-发送邮件
到邮件的From字段中的地址(它有一个Reply-To
字段,但它在语法上是格式错误的。)



也许这是故意的?


好​​的,好的,我今天非常好,所以尽管你有破坏性的Usenet
行为,我还会提供一些线索:

我想要一个常见问题解答网页上的页面,
很好。使用纯HTML创建它,如果你想要一些额外的糖,请在合适的组中询问(也许是comp.lang.javascript)。不要忘记
发布URL。



这里的JavaScript可能是主题。

http://openrico.org/demos.page?demo=ricoAccordion.html


这是基于AJAX的。你会在那里找到很多漂亮的小部件和效果。

我讨厌滚动你到答案的页面


如果您的个人不喜欢这么重要,那么您就不准备成为(有用的)常见问题解答的作者。




我实际上同意OP。但是,非隐藏文本的优点是所有内容都是可搜索的。

此外,使用链接,Luke。您可以轻松地创建一个问题列表,将它们链接到答案,在同一页面上(当然重复问题),或者在单独的页面上(如果答案很长,也许有插图等。)。



我完全同意,如果答案很长,那是值得的。不需要1k文本的整个

页面加载。这是过度的碎片化。

所以我认为这样做的好方法是
每个问题下隐藏的内容,



这是一个错误的想法。

字母表中的第一个字母是什么?
[字母表的第一个字母是A]



在某些情况下,将简单,强大和有用的链接概念与咨询相结合可能是有意义的。可选的快速回答使用
title属性(或一些JavaScript或DHTML技术)。例如:

...
< li>< a href =" first.html" title =
"字母表的第一个字母是& quot; A& quot;。它来自......"

字母表的第一个字母是什么?< / a>< / li>


......

其中first.html重复问题和简短答案,然后继续解释如何A。来自希腊字母alpha,在
转等等。



总的来说,可以采用任何一种方式。完全排除某人

其他人的奖励是很粗鲁的。


Roy


- -

Roy S. Schestowitz
http://Schestowitz.com


I''ve Googled, but can''t find what I need, perhaps I asking the wrong
question!

I want a "FAQ" page on a web site, I hate those pages that scroll you to
the answer so and I figured that a good way to do it would be to have
hidden content under each question, something like this [the text in the
brackets should appear when the question is clicked]:

What is the first letter of the alphabet?
[The first letter of the alphabet is "A"]

What is 5 + 5?
[5 + 5 is 10]

I''d like to have each answer loaded, so it appears straight away, and
ideally in a form that I can easily edit.

Any suggestions?
--
Nigel M

"Time may be a great healer,
but he''s a lousy beautician"

解决方案

Nigel Molesworth <re***@thegroup.com> wrote:

I''ve Googled, but can''t find what I need, perhaps I asking the
wrong question!
Maybe people who asked or answered the same question also used the
X-No-Archive: yes header. Does this give a clue?

Actually, the question has been asked so often, and it''s really not
about HTML, so I composed a short answer and sent it by E-mail
to the address in the From field of your message (it had a Reply-To
field, but it was syntactically malformed).

D
o
e
s

t
h
i
s

g
i
v
e

a

c
l
u
e
?

Okay, okay, I''m awfully nice today, so despite your destructive Usenet
conduct I''ll give a few more clues:
I want a "FAQ" page on a web site,
Fine. Create it, using pure HTML, and if you want some extra sugar on
it, ask in a suitable group (maybe comp.lang.javascript). Don''t forget
to post the URL.
I hate those pages that scroll you to the answer
If your personal dislikes matter that much, you are not prepared to
become the author of a (useful) FAQ.

Besides, use links, Luke. You can easily create a list of questions,
making them links to answers, on the same page (with the questions
repeated of course), or on separate pages (often a good idea if the
answers are long, perhaps with illustrations etc.).
so and I figured that a good way to do it would
be to have hidden content under each question,
That was a wrong idea.
What is the first letter of the alphabet?
[The first letter of the alphabet is "A"]
In some cases, it might make sense to combine the simple, robust, and
useful link idea with an advisory optional "quick answer" using the
title attribute (or some JavaScript or "DHTML" technique). For example:

....
<li><a href="first.html" title=
"The first letter of the alphabet is &quot;A&quot;. It comes from..."What is the first letter of the alphabet?</a></li>


....

where first.html repeats the question and the short answer, then
proceeds to explaining how "A" comes from Greek letter alpha, which in
turn etc. etc.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


In comp.infosystems.www.authoring.html, Jukka K. Korpela wrote:

Actually, the question has been asked so often, and it''s really not
about HTML, so I composed a short answer and sent it by E-mail
to the address in the From field of your message (it had a Reply-To
field, but it was syntactically malformed).



OK, apart from the fuckwit, has anyone got an suggestions?
--
Nigel M

"Time may be a great healer,
but he''s a lousy beautician"


Jukka K. Korpela wrote:

Nigel Molesworth <re***@thegroup.com> wrote:

I''ve Googled, but can''t find what I need, perhaps I asking the
wrong question!
Maybe people who asked or answered the same question also used the
X-No-Archive: yes header. Does this give a clue?

Actually, the question has been asked so often, and it''s really not
about HTML, so I composed a short answer and sent it by E-mail
to the address in the From field of your message (it had a Reply-To
field, but it was syntactically malformed).


Perhaps this was intentional?

Okay, okay, I''m awfully nice today, so despite your destructive Usenet
conduct I''ll give a few more clues:

I want a "FAQ" page on a web site,
Fine. Create it, using pure HTML, and if you want some extra sugar on
it, ask in a suitable group (maybe comp.lang.javascript). Don''t forget
to post the URL.


JavaScript is probably on-topic here.

http://openrico.org/demos.page?demo=ricoAccordion.html

This is AJAX-based. You''ll find plenty of nice widgets and effects there.

I hate those pages that scroll you to the answer



If your personal dislikes matter that much, you are not prepared to
become the author of a (useful) FAQ.



I actually agree with the OP. However, the advantage of non-hidden text is
that all content is searchable.
Besides, use links, Luke. You can easily create a list of questions,
making them links to answers, on the same page (with the questions
repeated of course), or on separate pages (often a good idea if the
answers are long, perhaps with illustrations etc.).


I totally agree that it''s worthwhile if the answers are lengthy. A whole
page load for 1k of text is unnecessary. It''s excessive fragmentation.

so and I figured that a good way to do it would
be to have hidden content under each question,



That was a wrong idea.

What is the first letter of the alphabet?
[The first letter of the alphabet is "A"]



In some cases, it might make sense to combine the simple, robust, and
useful link idea with an advisory optional "quick answer" using the
title attribute (or some JavaScript or "DHTML" technique). For example:

...
<li><a href="first.html" title=
"The first letter of the alphabet is &quot;A&quot;. It comes from..."

What is the first letter of the alphabet?</a></li>


...

where first.html repeats the question and the short answer, then
proceeds to explaining how "A" comes from Greek letter alpha, which in
turn etc. etc.


Overall, one could go either way. It''s rude to completely rule out somebody
else''s incentives.

Roy

--
Roy S. Schestowitz
http://Schestowitz.com


这篇关于点击问题时显示隐藏的答案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆