开发者

Use of HTML5 custom data attribute for AJAX response

开发者 https://www.devze.com 2023-04-10 05:48 出处:网络
I have never used HTML5 much and so am not aware of its limitation. But I have heard there is a useful custom data attribute which has got added. So my question is, can I use this for AJAX response h

I have never used HTML5 much and so am not aware of its limitation.

But I have heard there is a useful custom data attribute which has got added. So my question is, can I use this for AJAX response handling? By that I mean, say I have coded some placeholder divs with data attributes.

Now can I parse this JSON response to fill up the div elements easily. Or is there another quicker way?

Main thing i开发者_C百科s HTML structure would be separate and json response will only contain data.


You should check out the jQuery.template() plugin

0

精彩评论

暂无评论...
验证码 换一张
取 消