标签:nbsp char 分享 inf utf-8 width png 运行 exp
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>RegExp</title>
</head>
<body>
<script>
var reg=new RegExp("Paul");
var stringObj="Paul Paula Pauline";
var newstr=stringObj.replace(reg,"Ringo");
alert(newstr);
</script>
</body>
</html>
运行结果如图所示:
标签:nbsp char 分享 inf utf-8 width png 运行 exp
原文地址:https://www.cnblogs.com/taogao3364/p/9866208.html