0

I'm not sure about this properties, because I can't find them on w3c. Are they real position in browser?

anony_root
  • 1,477
  • 4
  • 16
  • 25

2 Answers2

0

No.

From a test I just performed:

> document.body.x
undefined
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

I believe that object.x and object.y are the positions of the element in the browser, however they're not always supported (by browser and also it may not always be relevant for an element)

An approach for identifying position: Retrieve the position (X,Y) of an HTML element

See javascript reference: http://www.w3schools.com/jsref/dom_obj_all.asp for all the positioning properties available

Documentation that x and y can provide position information: http://www.howtocreate.co.uk/tutorials/javascript/javascriptobject

Community
  • 1
  • 1
kaj
  • 5,133
  • 2
  • 21
  • 18