第一套方案:html
- <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>
- <td align="left"><input size="40" name="shoptitle" id="shoptitle" runat="server" /><span id="config1" style="display:none"><br />商店的标题将显示在浏览器的标题栏</span></td>
对应js:
- function clickHelp(bid)
- {
- if(bid.style.display==''){bid.style.display='none';}else{bid.style.display='';}
- }
第二套出自Jquery的入门教程:
- <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:
- $(document).ready(function() {
- $('#faq').find('dd').hide().end().find('dt').click(function() {
- var answer = $(this).next();
- if (answer.is(':visible')) {
- answer.slideUp();
- } else {
- answer.slideDown();
- }
- });
- });
虽然很简单,感觉不错。
发表于 @
2008年12月27日 17:26:00 | | 编辑|
举报| 收藏