by setting a breakpoint, I made sure the "$ ("#show_messages_div").append("<li>test</li>");" line is executed, but nothing happens, but if copy this line and execute it in the console, it works, this is so weird.
On Jul 6, 1:16 pm, Slowness Chen <slowness.c...@gmail.com> wrote: > the html is like the following. it works fine if I load it as a local > html file, but when I load it from a server, it doesn't, I printed $ > ("#show_messages_div").html() in console but it showed nothing. it > just doesn't make any sense to me. I tried searching around but found > nothing. can anybody give me a clue? thanks. > > BTW:when I load it from server side, it shows nothing but if I type "$ > ("#show_messages_div").append("dfdfdf")" in console, it works > > ... > <script type="text/javascript"> > $(document).ready(function() { > $("#show_messages_div").append('<h2>xxxx</h2>');}); > > </script> > ... > <div id="show_messages_div" width="300"></div>