繁体   English   中英

x是一个变量,用于存储来自AJAX调用的html。 我如何提取该HTML的属性

[英]x is a variable storing some html coming from AJAX call. how can i extract the attributes of that HTML

如何找到来自ajax调用的HTML的属性?

var x = table_row.find('td:nth-child(5)').html();  
var y = x.getAttribute("id");  // im doing this but this is not working

如果您想获取x对象ID,可以像var y = x.prop('id')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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