Javascript - innerHTML function in IE -
i have html file content
<html> <body> <script language="javascript"> function fun1() { alert(document.getelementbyid('id1').innerhtml); } </script> <div id="id1"> <ul> <li>here111</li> <li>here222</li> <li>here333</li> </ul> </div> <a href="javascript:void(0)" onclick="fun1()">click</a> </body> </html>
in innerhtml function iam getting only
<ul> <li>here111 <li>here222 <li>here333</li> </ul>
the </li>
tag missing how can entire content?
you have set id of div "test" getting "test1"
alert(document.getelementbyid('test1').innerhtml);
it should
alert(document.getelementbyid("test").innerhtml);
Comments
Post a Comment