对于
<span id="" ...>
<input id="" ...>
有什么方法可以检索span id吗?输入元素嵌入在跨度内?
最佳答案
document.getElementById("inputId").parentNode;
关于javascript - 如何检索输入元素及其包围的跨度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1531491/