crop_rotate
Run
<!DOCTYPE html> <html> <head> <title> HTML DOM Element offsetParent Property </title> </head> <body> <div id = "GFG"> <h1>Close Tag</h1> <button onclick="fun()"> Click Here! </button> <p>The offsetParent: <span id="myfun"></span> </p> </div> <!-- Script to return the offset parent --> <script> function fun() { // Return offset parent of div var offsetp = document.getElementById("GFG"); document.getElementById("myfun").innerHTML = offsetp.offsetParent; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCg0KPGhlYWQ+DQoJPHRpdGxlPg0KCQlIVE1MIERPTSBFbGVtZW50IG9mZnNldFBhcmVudCBQcm9wZXJ0eQ0KCTwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KDQo8Ym9keT4NCgk8ZGl2IGlkID0gIkdGRyI+DQoJCTxoMT5DbG9zZSBUYWc8L2gxPg0KCQkNCgkJPGJ1dHRvbiBvbmNsaWNrPSJmdW4oKSI+DQoJCQlDbGljayBIZXJlIQ0KCQk8L2J1dHRvbj4NCg0KCQk8cD5UaGUgb2Zmc2V0UGFyZW50Og0KCQkJPHNwYW4gaWQ9Im15ZnVuIj48L3NwYW4+DQoJCTwvcD4NCgk8L2Rpdj4NCgkNCgk8IS0tIFNjcmlwdCB0byByZXR1cm4gdGhlIG9mZnNldCBwYXJlbnQgLS0+DQoJPHNjcmlwdD4NCgkJZnVuY3Rpb24gZnVuKCkgew0KCQkNCgkJCS8vIFJldHVybiBvZmZzZXQgcGFyZW50IG9mIGRpdg0KCQkJdmFyIG9mZnNldHAgPQ0KCQkJCWRvY3VtZW50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