how to remove text from word in javascript code example Example: how to remove a text by javascript var ret = "data-123".replace('data-','');