Why is UIButton
returning UIButton
on this SVG element?
%%=HTTPPost2(@url,'application/json', @Json, true, @output,@respheader, 'client_id', 'CLient_ID_Here', 'client_secret',
offsetTop
答案 0 :(得分:1)
The inheritance tree for DOM elements has Element as a base class with SVGElement and HTMLElement deriving separately from that. offsetTop is defined on the HTMLElement interface and not on the Element interface so SVG elements don't support it.
You could get this information by calling element.getBoundingClientRect() instead. This would work for all elements.