<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>删除字符串中所有指定的字符</title>
</head>
<body>
<script>
var text = "[[系统部, 系统部], [网络部, 网络部], [设备部, 设备部]]";
alert(text.replace(/[[\] ]/g, ""));//系统部,系统部,网络部,网络部,设备部,设备部
</script>
</body>
</html>
replaceAll方法虽然也能实现,但貌似支持性不好