[img]http://dl2.iteye.com/upload/attachment/0087/0055/18da983f-7868-3fe6-b21f-17efbbfe92bd.jpg[/img]
示例:
示例:
<!doctype html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script src="inputFormat.js"></script>
<script type="text/javascript">
$(function(){
$('#account').inputFormat('account')
$('#money').inputFormat('amount')
})
</script>
</head>
<body>
帐号:<input id="account"/><br/>
金额:<input id="money"/>
</body>
</html>