Posted in Javascript onJuly 05, 2012
jQtransForm下载地址 https://3water.com/jiaoben/25166.html
用法
1- 添加脚本包含在标题部分的网页
//required <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.jqtransform.min.js"></script>
2- 写你的 form
<form class="jqtransform"> <div class="rowElem"> <label for="name">Name: </label> <input type="text" name="name" /> </div> <div class="rowElem"> <input type="submit" value="send" /> <div> </form>
3- 最后使用插件
After it, select the forms and call the jqTransform plugin. See some examples:
<script type="text/javascript"> $(function() { //find all form with class jqtransform and apply the plugin $("form.jqtransform").jqTransform(); }); </script>
兼容性:ie 6+, safari 2+, firefox 2+
附:select如有js联动效果,则不能美化。需要原有的select,如以下方法:
<script language="javascript"> $(function(){ $('.rowElem').jqTransform({imgPath:'jqtransformplugin/img/'}); }); </script>
<form action="" class="jqtransformdone" method="POST"> <div class="rowElem"> <label>标题</label> <input type="text" name="inputtext"/> </div> <div class="NOrowElem"> <label>地区</label> <select name="select1"> <option selected="selected" value="0">省</option> <option value="1523">北京</option> <option value="1524">陕西省</option> </select> <select name="select2" > <option selected="selected" value="">市</option> <option value="1525">北京市</option> <option value="1526">西安市</option> </select> </div> </form>
jqTransform form表单美化插件使用方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@