1、Replace
C#:(using System.Text.RegularExpressions;) string txt = Regex.Replace(txtLog.Text.ToString(), "/(^\s*)|(\s*$)/g", "");
js: var txt = document.all.txtLog.value.replace(/(^s*)|(s*$)/g, "");
1、Replace
C#:(using System.Text.RegularExpressions;) string txt = Regex.Replace(txtLog.Text.ToString(), "/(^\s*)|(\s*$)/g", "");
js: var txt = document.all.txtLog.value.replace(/(^s*)|(s*$)/g, "");