I created a html page and inserted a textbox. I would like to know a textbox destination in the page from javascript function? Example textbox's top is 100 px like that. Thank you.
Answer
Try this:
window.onload = function() {
console.log(document.getElementById("id1").offsetTop);
};
where id1
is the id of the textbox you need to triangulate.
No comments:
Post a Comment