Removing text from text returned by javascript function

Keywords´╝Ü javascript html


I have a function that returns text but I need to remove a specific substring from the returned text. I've tried a bunch of variations on suggestions I found through stackoverflow but none have worked so far. Any advice?

<div id="textfunction">
    $().ready(function(){" "}

I'd like to get: "Returned text: ." Instead, I'm getting: "Returned text: substring."