下拉框Onclick [英] Dropdown Box Onclick

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

问题描述

我想要做的是用javascript,我有一个PHP网站,当用户登录时,我希望他们看到带有向下箭头的小标签,当点击这个框时出现并显示用户头像和用户名等以及向上箭头,当用户点击此向上箭头时,该框会消失,只显示带有向下箭头的标签。


我一直在使用PHP& mySQL已经有7年多了,但是到现在为止真的使用了javascript,任何帮助都很受欢迎。提前致谢。

ImageShack - Image Hosting :: examplenc8.jpg

What I''m trying to do i think is with javascript, i have a site in PHP and when a user logs in i want them to see the little tab with the downwards arrow, when the click on this a box will appear and display the users avatar and username etc and an upwards arrow, when the user clicks on this upwards arrow then the box disappears back up and only shows the tab with the downwards arrow.

I''ve been working with PHP & mySQL for over 7 years now but near really used javascript till now, any help is well appreciated. Thanks in advance.

ImageShack - Image Hosting :: examplenc8.jpg

推荐答案

要显示隐藏的onclick,请将style.display属性更改为block。你应该把它设置为无。最初要隐藏它。当然,要再次隐藏它,请将其设置为无:
To show something hidden onclick, change the style.display property to "block". You should have it set to "none" initially to keep it hidden. Of course, to hide it again, set it back to none:
展开 | 选择 | Wrap | 行号


谢谢你,这不会逐渐变成然后会出现并逐渐消失,是吗?
Thanks for that, this wont make it gradually appear and gradually disappear though, will it?


好的,我玩过它并且我很难过,我的页面上有以下代码:
Ok, I''ve played around with it and I''m stumped, i have this code below on my page:
展开 | 选择 | 换行 | 行号


这篇关于下拉框Onclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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