隐藏/显示页面的一部分 [英] hiding/showing a section of a page

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

问题描述



如何在点击链接时隐藏/显示页面的一部分?


点击显示部分将显示该部分并将链接更改为

" hide section",点击隐藏部分隐藏它。


TIA。

Hi,
how can I hide / show a section of a page when a link is clicked?

Click on "show section" would show the section and change the link to
"hide section", clicking on "hide section" would hide it.

TIA.

推荐答案

最简单的形式:

在你的html页面上创建一个div标签

带有一个按钮/链接,使用onClick方法在函数使用文档中调用函数

。写入div标签

隐藏使用document.write将div标签设置为''''

< as ******* @ hotmail.com> ;在消息中写道

news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
in its simplest form:
create a div tag on your html page
with a button / link, use the onClick method to call a function
in the function use document.write to the div tag
to hide set the div tag to '''' using document.write
<as*******@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...

如何在点击链接时隐藏/显示页面的一部分?

点击显示部分将显示该部分并将链接更改为
隐藏部分,单击隐藏部分。隐藏它。

TIA。
Hi,
how can I hide / show a section of a page when a link is clicked?

Click on "show section" would show the section and change the link to
"hide section", clicking on "hide section" would hide it.

TIA.



这是IE特有的解决方案吗?

Is this an IE-specific solution?


嗨克雷格,

非常感谢你的回复。是否有可能给我一个简单的代码

样本?可以与IE和NN一起工作的东西? TIA。


Craig Keightley用最简单的形式写道:
Hi Craig,
thanks a lot for the reply. Is it possible to give me a simple code
sample? Somthing that would work with IE and NN? TIA.

Craig Keightley wrote:

在你的html页面上创建一个div标签
用一个按钮/ link,使用onClick方法调用函数
在函数中使用document.write到div标签
隐藏使用document.write将div标签设置为''''

< as ******* @ hotmail.com>在消息中写道
新闻:11 ********************** @ z14g2000cwz.googlegr oups.com ...
in its simplest form:
create a div tag on your html page
with a button / link, use the onClick method to call a function
in the function use document.write to the div tag
to hide set the div tag to '''' using document.write
<as*******@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...

如何在点击链接时隐藏/显示页面的一部分?

点击显示部分将显示该部分并将链接更改为
隐藏部分,单击隐藏部分。将它隐藏起来。

TIA。
Hi,
how can I hide / show a section of a page when a link is clicked?

Click on "show section" would show the section and change the link to
"hide section", clicking on "hide section" would hide it.

TIA.






这篇关于隐藏/显示页面的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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