在MutationObserver(function(mutations){...
我用这行打印过:
console.log('0=', mutations[0]);
如何访问此值:
id:"lbltime"
使用mutations[0].id
或
mutations[0].target.id
以下是相关代码的片段:
gg_observer = new MutationObserver(function (mutations)
{
if (mutations.length == 1)
{
console.log('mmm=', mutations[0].target);
console.log('id=', mutations[0].id);
console.log('0=', mutations[0]);
}
console.log("mutations =", mutations);
mutations.forEach(function (mutation)
{
console.log("mutation=", mutation);
});
//function continues below which I've removed