요소 자식에 대해서는 거의 문제가 없습니다.JavaScript로 요소 자식을 가리키는 방법
Heres는 일부 코드는 내 질문에 설명하기 :
function check(element){
// I want to get custom attribute from element children.
// Children elements are always radio buttons
var temp = element. ?? .attr('temp');
return temp;
}
// element variable is the whole div here
<div id = "test">
<table>
<tr>
<td> <input type="radio" temp="somethinghere"/></td>
</tr>
</table>
</div>
희망 누군가가 아이디어 나 더 나은 .. 솔루션을 제공합니다.
자녀가 여러 명인 경우 무엇을하고 싶습니까? – lonesomeday