1.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var str = 'abc345efg';
var num = str.replace("abc345efg","abc[3][4][5]efg") //replace替换 取代 接替 更换
document.write(num)
</script>
</body>
</html>
2.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var num = "abc";
var sum = num.replace("abc","cba")
document.write(sum)
</script>
</body>
</html>
3.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var str="border-left-color";
var num = str.replace("border-left-color","borderLeftColor")
document.write(num)
</script>
</body>
</html>