将文本添加到HTML页面 [英] Adding text to an HTML page

查看:97
本文介绍了将文本添加到HTML页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个完整的js新手问这个问题:


我有一个由几个问题组成的表格,每个问题都用一个收音机回答

按钮。我想使用onClick在窗体结尾处显示附加文本(不在文本框中)。我尝试过使用document.write(yada),但

它会在显示文本之前清除页面。我怎么能这样做?


BTW,我目前正在使用js与CSS一起取消隐藏文本。

这样可以正常工作,除了它除非文本显示,否则在

页面上需要大的空白块空间。看起来很糟糕。


-

Ed Jay(删除M以通过电子邮件回复)

A complete js newbie is asking this question:

I have a form comprised of several questions, each answered with a radio
button. I''d like to use onClick to bring up additional text at the end of
the form (not in a text box). I''ve tried using document.write("yada"), but
it clears the page before showing the text. How can I do it?

BTW, I''m currently using js in conjunction with CSS to unhide the text.
This works fine, except it requires large blank blocks of space on the
page, unless the text is shown. Looks bad.

--
Ed Jay (remove M to respond by email)

推荐答案

Ed Jay写道:
一个完整的js新手问的是这个问题:

我有一个由几个问题组成的表格,每个问题用一个收音机回答
按钮。我想使用onClick在表单的末尾显示其他文本(不在文本框中)。我尝试过使用document.write(yada),但是在显示文本之前它会清除页面。我该怎么做?


阅读常见问题 - 这里每周发布两次''comp.lang.javascript常见问题'':


<网址:http://www.jibbering.com/faq/>

顺便说一句,我目前正在使用js与CSS一起取消隐藏文字。
这样可以正常工作,除非在页面上需要大的空白区域,除非显示文本。看起来很糟糕。
A complete js newbie is asking this question:

I have a form comprised of several questions, each answered with a radio
button. I''d like to use onClick to bring up additional text at the end of
the form (not in a text box). I''ve tried using document.write("yada"), but
it clears the page before showing the text. How can I do it?
Read the FAQ - it''s posted here twice per week ''comp.lang.javascript FAQ'':

<URL:http://www.jibbering.com/faq/>


BTW, I''m currently using js in conjunction with CSS to unhide the text.
This works fine, except it requires large blank blocks of space on the
page, unless the text is shown. Looks bad.




在style.display =''''和''none''之间切换div。档案中有很多

的例子,搜索''切换显示无''并按日期排序




-

Rob



Toggle the div between style.display = '''' and ''none''. There are plenty
of examples in the archives, search for ''toggle display none'' and sort
by date.

--
Rob


RobG< rg *** @ iinet.net.au>写道:
RobG <rg***@iinet.net.au> wrote:
Ed Jay写道:
一个完整的js新手问这个问题:

我有一个由几个组成的表格问题,每个问题都用收音机按钮回答。我想使用onClick在表单的末尾显示其他文本(不在文本框中)。我尝试过使用document.write(yada),但是在显示文本之前它会清除页面。我该怎么办?
A complete js newbie is asking this question:

I have a form comprised of several questions, each answered with a radio
button. I''d like to use onClick to bring up additional text at the end of
the form (not in a text box). I''ve tried using document.write("yada"), but
it clears the page before showing the text. How can I do it?



阅读常见问题解答 - 它每周发布两次''comp.lang.javascript FAQ'':

< URL:http://www.jibbering.com/faq/>



Read the FAQ - it''s posted here twice per week ''comp.lang.javascript FAQ'':

<URL:http://www.jibbering.com/faq/>


BTW,我目前正在使用js CSS取消隐藏文本。
这样可以正常工作,除非在页面上需要大的空白区域,除非文本显示。看起来很糟糕。

BTW, I''m currently using js in conjunction with CSS to unhide the text.
This works fine, except it requires large blank blocks of space on the
page, unless the text is shown. Looks bad.



在style.display =''''和''none''之间切换div。档案中有很多示例,搜索切换显示无并按日期排序



Toggle the div between style.display = '''' and ''none''. There are plenty
of examples in the archives, search for ''toggle display none'' and sort
by date.




谢谢,Rob 。 FWIW我已经仔细研究了常见问题解答小时和这个NG'的帖子过去一年试图寻找解决方案,但都无济于事。我为我的失明道歉




-

Ed Jay(删除M以通过电子邮件回复)



Thanks, Rob. FWIW I''ve scoured the FAQ for hour and this NG''s posts for
the past year trying to find the solution, all to no avail. I apologize
for my blindness.

--
Ed Jay (remove M to respond by email)


Ed Jay写道:
RobG< rg *** @ iinet.net.au>写道:
RobG <rg***@iinet.net.au> wrote:
Ed Jay写道:
一个完整的js新手问这个问题:

我有一个由几个组成的表格问题,每个问题都用收音机按钮回答。我想使用onClick在表单的末尾显示其他文本(不在文本框中)。我尝试过使用document.write(yada),但是在显示文本之前它会清除页面。我该怎么办?
A complete js newbie is asking this question:

I have a form comprised of several questions, each answered with a radio
button. I''d like to use onClick to bring up additional text at the end of
the form (not in a text box). I''ve tried using document.write("yada"), but
it clears the page before showing the text. How can I do it?


阅读常见问题解答 - 它每周发布两次''comp.lang.javascript FAQ'':

< URL: http://www.jibbering.com/faq/>


Read the FAQ - it''s posted here twice per week ''comp.lang.javascript FAQ'':

<URL:http://www.jibbering.com/faq/>

BTW,我目前正在使用js与CSS一起取消隐藏文本。
BTW, I''m currently using js in conjunction with CSS to unhide the text.
This works fine, except it requires large blank blocks of space on the
page, unless the text is shown. Looks bad.


在style.display =''''和''none''之间切换div。档案中有很多例子,搜索切换显示无并按日期排序


Toggle the div between style.display = '''' and ''none''. There are plenty
of examples in the archives, search for ''toggle display none'' and sort
by date.



谢谢,Rob。我在过去的一年中试图找到解决方案,但是我已经仔细研究了常见问题解答以及这个NG的帖子,但都无济于事。我为我的失明道歉。



Thanks, Rob. FWIW I''ve scoured the FAQ for hour and this NG''s posts for
the past year trying to find the solution, all to no avail. I apologize
for my blindness.




常见问题:

< URL:http://www.jibbering.com/常见问题/#FAQ4_15>


发布 - 嘿,我的一个:-)

< URL:http://groups.google.co.uk /group/comp.lang.javascript/browse_frm/thread/892475e53aacd31a/217b782a199a2b96?q=display+none+toggle+showhide&rn um = 3#217b782a199a2b96>


-

Rob



FAQ:
<URL:http://www.jibbering.com/faq/#FAQ4_15>

Post - hey, one of mine :-)
<URL:http://groups.google.co.uk/group/comp.lang.javascript/browse_frm/thread/892475e53aacd31a/217b782a199a2b96?q=display+none+toggle+showhide&rn um=3#217b782a199a2b96>


--
Rob


这篇关于将文本添加到HTML页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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