public string GetHtml(object obj) { string result = ""; System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("{.*,.*,.*}"); string matchResult = regex.Match(obj.ToString()).ToString(); if (string.IsNullOrEmpty(matchResult)) { result = obj.ToString(); } else { string[] strs = matchResult.Replace("{", "").Replace("}", "").Split(','); result = " "; result += " " + strs[0] + " "; result += " " + strs[1] + " "; result += " " + strs[2] + " "; } return result; }
以上代码主要是为了获取3个值, strs[0]=759 strs[1]=+0.6 strs[0]=-0.4 这样用来显示上下
??
??
查看更多关于CSS文本上下标_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did107521