How to fix this java script error handling single quote in the line
<p>Hi I had a similar requirement as below and was 
curious to know to fix the issue.</p>

<p>Below is the code</p>

<pre><code>&lt;script type="text/javascript"&gt;
function Msg1(){
  var sd= document.getElementById('myText').innerHTML = 'Thank's!';
  alert('-sd-'+sd);
}
function Msg2(){
  document.getElementById('myText').innerHTML = 'Try messages 1 again...';
}
&lt;/script&gt;
&lt;input type="button" onclick="Msg1()" value="Show Message 1" /&gt;
&lt;input type="button"  onclick="Msg2()" value="Show Message 2" /&gt;
&lt;p id="myText"&gt;&lt;/p&gt; 
</code></pre>

<p>The <code>innerHTML</code> tag is throwing script error like</p>

<pre><code>Webpage error details


Message: Expected ';'
Line: 29
Char: 64
Code: 0
URI: file:///C:/Documents%20and%20Settings/j1007962/Desktop/spl.html
</code></pre>

<p>I was looking for the fix around <code>innerHTML</code> or better replace with something which would fix
this . Thanks</p>
