Strange innerHTML Behavior
I used the code below as an experiment (in IE7):
When the button is clicked, the text of testdiv2 doesn't change on the browser, but the text of testdiv changes to "xViantU". And, the alerts come back as "xViantU" and "xViantU&COutpatient", respectively.
<input type="button" value="click" onClick="testdiv.innerHTML='xViantU&CInpatient'; testdiv2.innerHTML='xViantU&COutpatient'; alert(testdiv.innerHTML); alert(testdiv2.innerHTML)">
I don't understand why the "&" gets converted to "&" for the 2nd, but not for the 1st. Any light shed on this is appreciated -- thanks.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)