簡體   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