|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Demo - Validform</title>
<link rel="stylesheet" href="static/css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
</head>
<body>
<div class="main">
<div class="wraper">
<form id="registerform" >
<table width="100%" style="table-layout:fixed;">
<tr>
<td style="width:70px;">中文名:</td>
<td style="width:205px;"><input type="text" value="" name="name" class="inputxt" datatype="z2-4" nullmsg="请输入中文名!" errormsg="中文名为2~4个中文字符!" /></td>
</tr>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
</table>
</form>
</div>
</div>
<div id="container" style="min-width:800px;height:400px;"></div>
<script src="http://code.jquery.com/jquery-1.12.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="http://validform.rjboy.cn/Validform/v5.3.2/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
//自定义2-4位中文字符
<script type="text/javascript">
$("#registerform").Validform({
tiptype:3,
datatype:{
"zh2-4" : /^[\u4E00-\u9FA5\uf900-\ufa2d]{2,4}$/,
}
})
</script>
</body>
</html> |
|
|
|
|
|
|