如何编码NodeList.getElementsByTagName [英] how to code NodeList.getElementsByTagName

查看:38
本文介绍了如何编码NodeList.getElementsByTagName的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行以下操作

I?m trying to do the following

展开 | 选择 | Wrap | 行号

推荐答案

我可以通过以下方式阻止异常
I can prevent the Exception by
展开 | 选择 | Wrap | 行号


嗨Dormilich,

你想得到的吗? < sup>?内的锚点对象我尝试了这个......
Hi Dormilich,
Do u want to get the anchor object inside the <sup>? I tried out this one...
展开 | 选择 | Wrap | 行号


@RamananKalirajan


是的,我想获得那些锚点(这不是问题),但我需要它们作为一个列表返回(这是问题)。这里没有任何警报:(


也许它在返回数组时也有效(虽然那不一样)
@RamananKalirajan
yes, I want to get those anchors (which is not a problem as is), but I need them returned as one list (which is the problem here). an alert is of no use here :(

maybe it also works when returning an Array (though that?s not the same)


这篇关于如何编码NodeList.getElementsByTagName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆