jqTransform form表單美化插件使用方法
更新時(shí)間:2012年07月05日 23:15:31 作者:
jQtransForm jQuery表單美化修飾插件,附帶有PHP提交程序,當(dāng)然ASP/ASP/NET/JSP都是同理,這里主要是jQuery美化部分的實(shí)例,美化對(duì)象為文本框、密碼框、文本域、Select下拉框、按鈕等,有了這些示例,美化其它的表單元素應(yīng)該不是大問題。
jQtransForm下載地址 http://www.dbjr.com.cn/jiaoben/25166.html
用法
1- 添加腳本包含在標(biāo)題部分的網(wǎng)頁
//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聯(lián)動(dòng)效果,則不能美化。需要原有的select,如以下方法:
<script language="javascript">
$(function(){
$('.rowElem').jqTransform({imgPath:'jqtransformplugin/img/'});
});
</script>
<form action="" class="jqtransformdone" method="POST">
<div class="rowElem">
<label>標(biāo)題</label>
<input type="text" name="inputtext"/>
</div>
<div class="NOrowElem">
<label>地區(qū)</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>
用法
1- 添加腳本包含在標(biāo)題部分的網(wǎng)頁
復(fù)制代碼 代碼如下:
//required
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.jqtransform.min.js"></script>
2- 寫你的 form
復(fù)制代碼 代碼如下:
<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:
復(fù)制代碼 代碼如下:
<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聯(lián)動(dòng)效果,則不能美化。需要原有的select,如以下方法:
復(fù)制代碼 代碼如下:
<script language="javascript">
$(function(){
$('.rowElem').jqTransform({imgPath:'jqtransformplugin/img/'});
});
</script>
復(fù)制代碼 代碼如下:
<form action="" class="jqtransformdone" method="POST">
<div class="rowElem">
<label>標(biāo)題</label>
<input type="text" name="inputtext"/>
</div>
<div class="NOrowElem">
<label>地區(qū)</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>
相關(guān)文章
jQuery實(shí)現(xiàn)模仿微博下拉滾動(dòng)條加載數(shù)據(jù)效果
這篇文章主要介紹了jQuery實(shí)現(xiàn)模仿微博下拉滾動(dòng)條加載數(shù)據(jù)效果,涉及jQuery響應(yīng)下拉滾動(dòng)事件動(dòng)態(tài)操作頁面元素的技巧,需要的朋友可以參考下2015-12-12jQuery 連續(xù)列表實(shí)現(xiàn)代碼
你有沒有手工的編寫過一些重復(fù)的代碼?你也覺得它們是如此的無聊吧。好了,這里有更好的解決辦法。2009-12-12jquery cookie實(shí)現(xiàn)的簡(jiǎn)單換膚功能適合小網(wǎng)站
使用jquery cookie做了一個(gè)簡(jiǎn)單的換膚功能適合小網(wǎng)站并且代碼低級(jí),具體實(shí)現(xiàn)過程如下,感興趣的朋友可以了解下2013-08-08Jquery創(chuàng)建層顯示標(biāo)題和內(nèi)容且隨鼠標(biāo)移動(dòng)而移動(dòng)
本文為大家介紹下使用Jquery創(chuàng)建一個(gè)層顯示標(biāo)題的內(nèi)容且隨鼠標(biāo)移動(dòng),具體的實(shí)現(xiàn)如下2014-01-01jQuery操作Dom元素與遍歷以及JS遍歷詳細(xì)講解
這篇文章主要介紹了jQuery操作Dom元素、jQuery遍歷、JavaScript遍歷,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧2023-01-01運(yùn)用jquery實(shí)現(xiàn)table單雙行不同顯示并能單行選中
(該方法是對(duì)《運(yùn)用jquery實(shí)現(xiàn)(table)單雙行不同顯示并能多行選中》的改進(jìn),適合于單行選擇)2009-07-07有關(guān)jQuery中parent()和siblings()的小問題
本文通過一個(gè)實(shí)例給大家介紹有關(guān)parent()和siblings()問題原因及解決方案,非常不錯(cuò)具有參考借鑒價(jià)值,感興趣的朋友一起看看吧2016-06-06