计数“,”,“在文本框上 [英] count number of "," on textbox

查看:61
本文介绍了计数“,”,“在文本框上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有人试过/经验计算文本框中的,逗号,我想限制用户可以在文本框上输入的,。

解决方案

解决你的问题,你必须在这里访问....







http://stackoverflow.com/questions/13602606/using-regex-to-limit-special-characters-in-a-textbox-using-jquery-in-asp-net-mvc [ ^ ]


http://stackoverflow.com/questions/3016522/count-the-number-of -times-a-string-appear-in-a string?lq = 1


找到答案:)



var dot = document.getElementById('<%= txtIP.C value.split()长度) ;。lientID%GT

Hi
have anybody tried/experience on counting the "," commas on a textbox, I want to limit the "," that a user can input on a textbox.

解决方案

to solve your problem you have to visit here....



http://stackoverflow.com/questions/13602606/using-regex-to-limit-special-characters-in-a-textbox-using-jquery-in-asp-net-mvc[^]


http://stackoverflow.com/questions/3016522/count-the-number-of-times-a-string-appears-within-a-string?lq=1


Found the answer :)

var dot = document.getElementById('<%=txtIP.ClientID%>').value.split(".").length;


这篇关于计数“,”,“在文本框上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆