过滤特殊字符函数

function testStudioFilter(data){
	if(data!=null&&isNaN(data)){
		var re = new RegExp("'", "gi");
		data = data.replace(re,"");
		re = new RegExp('"', "gi");
		data = data.replace(re,"");
		re = new RegExp("<", "gi");
		data = data.replace(re,"");
		re = new RegExp(">", "gi");
		data = data.replace(re,"");
		re = new RegExp(" ", "gi");
		data = data.replace(re,"");
	}
	return data;
};

你可能感兴趣的:(去掉字符中间的特殊字符,过滤特殊字符函数)