This will provide your answer:
Each HTML element has an innerHTML property that defines both the HTML
code and the text that occurs between that element's opening and
closing tag. By changing an element's innerHTML after some user
interaction, you can make much more interactive pages.
However, using innerHTML requires some preparation if you want to be
able to use it easily and reliably. First, you must give the element
you wish to change an id. With that id in place you will be able to
use the getElementById function, which works on all browsers.
After you have that set up you can now manipulate the text of an
element. To start off, let's try changing the text inside a bold tag.
Example:
<script type="text/javascript">
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}
</script>
<p>Welcome to the site <b id='boldStuff'>dude</b> </p>
<input type='button' onclick='changeText()' value='Change Text'/>
However, this is with user interaction, you could change it so that this function will be called in another function wich will trigger this.
/*my lines*/string to make sure I am replacing the right i=1/*my lines*/ $(function(){i=1;}); /**********/. It may be anything. I need to locate the string based on its beginning/*my lines*/and ending/**********/