第13款插件:formToWizard向导式表单插件

描述:可以使用此插件将长表彰转换为向导式表单,以显示当前所处的步骤及输入的内容,方便用户输入。

兼容浏览器:兼容所有IE浏览器/Firefox/Google Chrome

官方链接:
 http://www.jankoatwarpspeed.com/ ... -wizard-jquery.aspx

JS下载:
 http://ijquery.360sites.cn/js/jquery.formToWizard.js

预览:  
http://ijquery.360sites.cn/demo/formtowizard

打包下载: http://ijquery.360sites.cn/demo/formtowizard/formtowizard.zip

参数说明:

  1. submitButton:'id'  //button的id
复制代码
图片展示:


JS引用代码:
  1. <script type="text/javascript" charset="utf-8" src="http://ijquery.360sites.cn/js/jquery-1.4.2.min.js"></script>
  2. <script type="text/javascript" charset="utf-8" src="http://ijquery.360sites.cn/js/jquery.formToWizard.js"></script>
  3. <script>
  4.         $(function () {
  5.                 $('#SignupForm').formToWizard({
  6.                         submitButton: 'SaveAccount'
  7.                 });
  8.         });
  9. </script>
复制代码
HTML代码:
  1. <form id="SignupForm">
  2.         <fieldset>
  3.                 <legend>个人信息</legend>
  4.                 <dl>
  5.                         <dt><label for="Name">姓名</label></dt>
  6.                         <dd><input id="Name" type="text" /></dd>
  7.                         <dt><label for="Email">电子邮箱</label></dt>
  8.                         <dd><input id="Email" type="text" /></dd>
  9.                         <dt><label for="Password">密码</label></dt>
  10.                         <dd><input id="Password" type="password" /></dd>
  11.                 </dl>
  12.         </fieldset>
  13.         
  14.         <fieldset>
  15.                 <legend>公司信息</legend>
  16.                 <dt><label for="CompanyName">公司名称</label></dt>
  17.                 <dd><input id="CompanyName" type="text" /></dd>
  18.                 <dt><label for="Website">公司主页</label></dt>
  19.                 <dd><input id="Website" type="text" /></dd>
  20.                 <dt><label for="CompanyEmail">公司的联络邮箱</label></dt>
  21.                 <dd><input id="CompanyEmail" type="text" /></dd>
  22.         </fieldset>
  23.         
  24.         <fieldset>
  25.                 <legend>支付信息</legend>
  26.                 <dt><label for="NameOnCard">信用卡公司</label></dt>
  27.                 <dd><input id="NameOnCard" type="text" /></dd>
  28.                 <dt><label for="CardNumber">信用卡号码</label></dt>
  29.                 <dd><input id="CardNumber" type="text" /></dd>
  30.                 <dt><label for="CreditcardMonth">有効期限</label></dt>
  31.                 <dd>
  32.                         <select id="CreditcardMonth">
  33.                                 <option value="01">01</option>
  34.                                 <option value="02">02</option>
  35.                                 <option value="03">03</option>
  36.                                 <option value="04">04</option>
  37.                                 <option value="05">05</option>
  38.                                 <option value="06">06</option>
  39.                                 <option value="07">07</option>
  40.                                 <option value="08">08</option>
  41.                                 <option value="09">09</option>
  42.                                 <option value="10">10</option>
  43.                                 <option value="11">11</option>
  44.                                 <option value="12">12</option>
  45.                         </select>
  46.                         <select id="CreditcardYear">
  47.                                 <option value="2010">2010</option>
  48.                                 <option value="2011">2011</option>
  49.                                 <option value="2012">2012</option>
  50.                                 <option value="2013">2013</option>
  51.                                 <option value="2014">2014</option>
  52.                                 <option value="2015">2015</option>
  53.                                 <option value="2016">2016</option>
  54.                                 <option value="2017">2017</option>
  55.                                 <option value="2018">2018</option>
  56.                                 <option value="2019">2019</option>
  57.                                 <option value="2020">2020</option>
  58.                         </select>
  59.                 </dd>
  60.                 <dt><label for="City">所属省市</label></dt>
  61.                 <dd><input id="City" type="text" /></dd>
  62.                 <dt><label for="Address1">地址1</label></dt>
  63.                 <dd><input id="Address1" type="text" /></dd>
  64.                 <dt><label for="Address2">地址2</label></dt>
  65.                 <dd><input id="Address2" type="text" /></dd>
  66.         </fieldset>
  67.         
  68.         <div id="submitform">
  69.                 <input id="SaveAccount" type="button" value="提交" />
  70.         </div>
  71. </form>
复制代码
CSS代码:
  1. dt {width: 11em;}
  2. dd {margin: -1.5em 0 1em 0;padding: 0 0 1em 12em;border-bottom: 1px solid #ccc;}
  3. #submitform {width: 320px;text-align: right;}
  4. #SaveAccount {margin: 10px 0 0 0;}
  5. fieldset {width: 320px;}
  6. legend {font-size: 1.6em;padding: 10px 0px;color: #b0232a;font-weight: bold;}
  7. .prev, .next {background-color: #b0232a;padding: 5px 10px;color: #fff;text-decoration: none;}
  8. .prev:hover, .next:hover {background-color: #000;text-decoration: none;}
  9. .prev {float: left;}
  10. .next {float: right;}
  11. #steps {list-style: none;width: 100%;overflow: hidden;}
  12. #steps li {font-size: 24px;float: left;padding: 10px;color:#b0b1b3;}
  13. #steps li span {font-size: 11px;display:block;}
  14. #steps li.current {color: #000;}
  15. #makeWizard {background-color: #b0232a;color: #fff;padding: 5px 10px;text-decoration: none;font-size: 18px;}
  16. #makeWizard:hover {background-color: #000;}
复制代码

[转] http://ijquery.360sites.cn/forum.php?mod=viewthread&tid=13

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值