点击显示隐藏层
用户注册时点击多选框。显示填写高级资料。点击文章标题显示文章简介。点击留言标题显示留言内容。
Cngothic不会AJAX做不了异步交互的效果。通常使用JS来做类似的效果。发个使用的代码示例:

  1. <script type="text/javascript">
  2. function look(id){
  3. if (id.style.display == "none"){
  4. id.style.display=""
  5. }
  6. else {
  7. id.style.display="none"
  8. }
  9. }
  10. </script>
  11. <style type="text/css">
  12. #content {margin-top:20px; background:#ccc; height:200px; }
  13. </style>
  14. <div id="title">
  15. <label>点击显示高级选项</label><input name="" type="checkbox" value="" onClick="look(content1)">
  16. </div>
  17.  
  18. <div id="content1" style="display:none;">
  19. 高级选项内容!
  20. 这种效果大多用到会员注册表单上面。知道使用方法后可以演变出很多效果。Cngothic变常用到文章列表中。
  21. Cngothic不会AJAX做不了异步交互。呵呵。
  22. </div>

, ,

引用fieldset-legend示例
在引用文本时用到了fieldset-legend。这两个不太常用的标签应该怎么加CSS来美化它尼。

引用fieldset-legend图:

Read the rest of this entry »

, ,

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

Read the rest of this entry »

, ,

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

, , ,

选项卡制作教程,选项卡代/源码
网上关于选项卡制作教程,选项卡代/源码五花八门.今Cngothic把自己收录的一个选项卡代/源码共享下.
共四例使用同一个代码.只是CSS样式有部分修改.

  1. <!--JavaScript部分-->
  2. <SCRIPT language=javascript>
  3. function secBoard(n)
  4. {
  5. for(i=0;i<secTable.cells.length;i++)
  6. secTable.cells[i].className="sec1";
  7. secTable.cells[n].className="sec2";
  8. for(i=0;i<mainTable.tBodies.length;i++)
  9. mainTable.tBodies[i].style.display="none";
  10. mainTable.tBodies[n].style.display="block";
  11. }
  12. </SCRIPT>

Read the rest of this entry »

, ,