var str= str.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?/\,/\。/\;/\:/\“/\”/\》/\《/\|/\{/\}/\、/\!/\~/\`]/g,"")
例如过滤掉地址栏中的"#/"
let {search,href} = window.location; href = href.replace(/#\//g,'')
过滤# 过滤/("/"做为特别字符,需要前面加"/")
/g 表示不是第一个,多个过滤