Building an HTML table on the fly using jQuery

前端 未结 8 800
夕颜
夕颜 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:34

    Using innerHTML can definitely be much faster than using jQuery's HTML-to-DOM-ifier, which uses innerHTML but does a lot of processing on the inputs.

    I'd suggest checking out chain.js as a way to quickly build out tables and other repeating data structures from JavaScript objects. It's a really lightweight, smart databinding plugin for jQuery.

提交回复
热议问题