nicejforms可以算是jquery的一个插件,可以起到非常好的美化表单的作用
demo:
http://www.healdream.com/upload/html/nicejforms/nicejforms_green.html
down:
http://www.51files.com/?O4IXTNT9ZO9BIL954XTP
用法:
首先将两个js包含进来,就像这样
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Page title</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="nicejforms.js"></script>
</head>
<body>
然后加入css
<style type="text/css" media="screen">@import url("niceforms.css")</style>
接着对form,设定class
<form action="vars.php" method="POST" class="niceform">
最后写下如下语句
<script type="text/javascript">
$(document).ready( function() { $.NiceJForms.build(); } );
</script>
这样就大功告成了!