实现用户名 如 封???诺

var reg = /^(.).+(.)$/g;
var name=v.name.replace(reg, "$1***$2");
实现人民币 100.000格式
var money=(v.money || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
jQuery判断元素是否显示 是否隐藏
<script type="text/javascript">
if(!node.is(':visible')){
node.show();
}else{
node.hide();
}
</script>
jQuery 改变文本框边框/背景颜色
<script src=/scripts/jquery-1.8.3.min.js></script>
<script>
$(function() {
$(":text").focus(function() {
$(this).css('border-color', '#0f0');
}).blur(function() {
$(this).css('border-color', '');
})
});
</script>
<input type=text>