I m doing one project in that, The hight of div is 400px; fixed height and overflow:auto; There is a table having 100 rows Displaying Data Dynamically, Now when i refresh page my highlighted rows goes down and scroll positio is up; I want that, when page is refresh the highlighted Row should be f开发者_运维知识库ocused and position of scroll not in top as per content,
Thanks In advance
Some HTML:
<div style="overflow:auto; width:400px; height:300px;" >
When the page is refreshed, all date/values/selections that you loaded/changed/set dynamically using Javascript on the client side is typically lost.
Unless you stored the selections server side as well.
For example with a POST
to a certain PHP script that stores the selected value in the PHP global $_SESSION
variable. And the page refresh then analyzes the $_SESSION
variable to find out what default data/selections to set.
See also this related question: how to retain the div contents after page refresh
精彩评论