简体   繁体   中英

Use of HTML5 custom data attribute for AJAX response

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 is HTML structure would be separate and json response will only contain data.

您应该签出jQuery.template()插件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM