jqTransform form表单美化插件使用方法
jQtransForm下载地址 http://www.jb51.net/jiaoben/25166.html
//required
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.jqtransform.min.js"></script>
<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>