js中name.replace(/\.n/g, '.')
1个回答
2015-02-07
展开全部
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>last.html</title>
<style>
</style>
<script type="text/javascript">
var name = ".n.n.n.n.n";
// 把成对的.n转换为.
name = name.replace (/\.n/g, '.');
alert(name)
</script>
</head>
<body>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询