我得到这个字符串
var cadena = "I´m from Mexico"
需要替换或删除'
var cadena = "Im from Mexico "
答案 0 :(得分:2)
如果只有一个
var cadena = "I´m from Mexico".replace('`', '');
要替换所有匹配项,请使用正则表达式:
var cadena = "I´m from Mexico".replace(/`/g, '');
请参阅JavaScript String.replace方法https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/replace