标签: javascript string
我在Javascript中有这样的字符串:
string = '@usernameWhats on your mind?'
我需要从字符串中删除'Whats on your mind?'。
'Whats on your mind?'
我该怎么做?
答案 0 :(得分:100)
var new_string = string.replace('Whats on your mind?', '');