Building an HTML table on the fly using jQuery

前端 未结 8 815
夕颜
夕颜 2020-12-07 18:18

Below is the code I use to build an HTML table on the fly (using JSON data received from the server).

I display an animated pleasewait (.gif) graphic while the data

8条回答
  •  青春惊慌失措
    2020-12-07 18:44

    For starters, check out flydom and it's variants, they will help termendously. Could you possibly give more context? If this is not in the onload and just pasted in the page, just wrapping the whole thing in $(function () { /* code */ }) will probably clean up everything you are having problems with. Inline JS is executed immediately, which means that loop for the table. onload is an event and essentially 'detached'.

提交回复
热议问题