private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            var textBox = (sender as TextBox);
            if (textBox == null) return;
            textBox.Text = Regex.Replace(textBox.Text,"[^\\d\\.]+","");
            textBox.SelectionStart = textBox.Text.Length;
        }
posted on 2013-06-13 08:45 sanmao 阅读(1004) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜