js和C# 编码 解码

C#中对URL编码的方法。。。 
编码:Server.UrlEncode(string) 
解码:Server.UrlDecode(string)

HttpUtility.UrlEncode(string) ,HttpUtility.UrlDecode(string) 

JS

escape();

unescape();

function isPone($poneInput) {
var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test($poneInput.val())) {
return false;
} else {
return true;
}
}

 

System.Text.RegularExpressions.Regex.IsMatch(str_handset, @"^[1]+[3,5]+\d{9}");

posted @ 2018-08-09 15:34  杜子烟  阅读(149)  评论(0编辑  收藏  举报