点击显示隐藏层
在用户注册时点击多选框。显示填写高级资料。点击文章标题显示文章简介。点击留言标题显示留言内容。
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>
display, onclick, 隐藏层
引用fieldset-legend示例
在引用文本时用到了fieldset-legend。这两个不太常用的标签应该怎么加CSS来美化它尼。
引用fieldset-legend图:

Read the rest of this entry »
fieldset, legend, 示例
表单元素onfous()改变样式 当表单内的文本框获取焦聚时其文件框的样式改变。看这句以为Cngothic当时会以为是在每个表单元素上面加一句JS。如:onfous=”..”.今个在织梦里看到一个不错例子便收录下来.有兴趣的朋友可以看看。

Read the rest of this entry »
onfous(), 样式, 表单
推荐一款漂亮的日历插件.相比Cngothic另一日志中提到的网页日期/日历控件-Web Calendar拥有更弦的界面。采用CSS做的界面可以很方便的修改界面。应用于网中。来选择日期是那么的方便。经我测试这个好像不可以选择今天以前的时间。
漂亮的日历插件下载

Read the rest of this entry »
Web Calendar 网页日历, 日期控件, 网页日历, 表单
选项卡制作教程,选项卡代/源码
网上关于选项卡制作教程,选项卡代/源码五花八门.今Cngothic把自己收录的一个选项卡代/源码共享下.
共四例使用同一个代码.只是CSS样式有部分修改.
- <!--JavaScript部分-->
- <SCRIPT language=javascript>
- function secBoard(n)
- {
- for(i=0;i<secTable.cells.length;i++)
- secTable.cells[i].className="sec1";
- secTable.cells[n].className="sec2";
- for(i=0;i<mainTable.tBodies.length;i++)
- mainTable.tBodies[i].style.display="none";
- mainTable.tBodies[n].style.display="block";
- }
- </SCRIPT>
Read the rest of this entry »
css, Javascript脚本, 选项卡