<script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script> static bool IsNumeric( string str) ... { if (str==null || str.Length==0) return false; foreach(char c in str) ...{ if (!Char.IsNumber(c)) ...{ return false; } } return true; } 正则表达的写法是: static bool IsNumeric( string str) ... { System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[-]?d+[.]?d*$"); return reg1.IsMatch(str); }