1
의 :옵션 요소의 jQuery를 위치는 항상 0,0 select 요소에 대한 IE
이<select id="s1" size="4">
<option>o1</option>
<option>o1</option>
<option>o1</option>
<option>o1</option>
</select>
다음 코드는 항상 크롬에서 IE 11 0 0 만 26 구를 반환
var selectelem = document.getElementById("s1");
var children = selectelem.querySelectorAll("option");
console.log($(children[1]).position().top + " " + $(children[1]).position().left);
인가가 이 문제를 해결할 수있는 방법은 무엇입니까?
console.log (children [1] .getBoundingClientRect());를 사용하여 시도했습니다. – user4617883
IE 디벨로퍼 도구 (0, 0, 자동, 자동)에 나타나지 않습니다. 남자는 대신 목록을 사용하거나 오프셋을 계산할 수 있습니다. – Lain