<form name=form1 method=post action="">
<input type=text name=f1 onpropertychange="ff()">
</form> <script>
function ff()
{
var uStr = this.form1.f1.value;
if (uStr.length==4)
{
this.form1.f1.value=uStr.substr(0,1) +","+ uStr.substr(1,3);
}
}
</script>
还有些细节你自己添加代码测试
<input type=text name=f1 onpropertychange="ff()">
</form> <script>
function ff()
{
var uStr = this.form1.f1.value;
if (uStr.length==4)
{
this.form1.f1.value=uStr.substr(0,1) +","+ uStr.substr(1,3);
}
}
</script>
还有些细节你自己添加代码测试
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货