3rd
05.08
点击显示隐藏层
在用户注册时点击多选框。显示填写高级资料。点击文章标题显示文章简介。点击留言标题显示留言内容。
Cngothic不会AJAX做不了异步交互的效果。通常使用JS来做类似的效果。发个使用的代码示例:
- <script type="text/javascript">
- function look(id){
- if (id.style.display == "none"){
- id.style.display=""
- }
- else {
- id.style.display="none"
- }
- }
- </script>
- <style type="text/css">
- #content {margin-top:20px; background:#ccc; height:200px; }
- </style>
- <div id="title">
- <label>点击显示高级选项</label><input name="" type="checkbox" value="" onClick="look(content1)">
- </div>
- <div id="content1" style="display:none;">
- 高级选项内容!
- 这种效果大多用到会员注册表单上面。知道使用方法后可以演变出很多效果。Cngothic变常用到文章列表中。
- Cngothic不会AJAX做不了异步交互。呵呵。
- </div>
Name: Cngothic 













