原创  简单的信息提示 收藏

第一套方案:html
  1. <td align="right" valign="top" class="title01"><a title="点击此处查看提示信息" href="javascript:clickHelp(config1);"><img height="16" alt="点击此处查看提示信息" src="../images/notice.gif" width="16" border="0" /></a> 商店标题:</td>
  2.       <td align="left"><input size="40" name="shoptitle" id="shoptitle" runat="server" /><span id="config1" style="display:none"><br />商店的标题将显示在浏览器的标题栏</span></td>
对应js:
  1. function clickHelp(bid)
  2. {
  3.     if(bid.style.display==''){bid.style.display='none';}else{bid.style.display='';}
  4. }
第二套出自Jquery的入门教程:
  1. <dt>My bird is healthy. I don't need to go to a vet, do I?</dt>     <dd>Schedule a "well-bird" checkup. Prevention is the best medicine. Even though the bird might appear outwardly healthy, it may have a low-grade infection or something not so readily apparent. Your bird's health and your peace of mind will be worth it.</dd>
对应 JS:
  1. $(document).ready(function() {
  2.     $('#faq').find('dd').hide().end().find('dt').click(function() {
  3.          var answer = $(this).next();
  4.          if (answer.is(':visible')) {
  5.              answer.slideUp();
  6.          } else {
  7.              answer.slideDown();
  8.          }
  9.      });
  10. });
虽然很简单,感觉不错。

发表于 @ 2008年12月27日 17:26:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:生成缩略图 | 新一篇:Jquery插件站点

  • 发表评论
  • 评论内容:
  •  
Copyright © apollo_ts
Powered by CSDN Blog