If there is a drop-down box in the table and a Treeview, all the nodes in the Treeview are obtained from the drop-down menu in the drop-down box. Therefore, after locating the node first, when you select other options in other drop-down boxes, the scrolltop value of the DIV will keep the position of the scroll bar of the previous step. <Body Style = "Background: # eff9fa" Onscroll = "onscrollform ();" onLoad = "formonload ();"
Scroll = "no" Ondblclick = "javascript: Document. form1.submit ();">
<SCRIPT type = "text/JavaScript" Language = "JavaScript">
<! --
Function scrolldiv ()
{
Document. All. Pos. value = Document. All. onlinediv. scrolltop;
// Onlinediv is a div
}
Function formonload ()
{
Onloadforscroll ();
}
Function onloadforscroll ()
{
VaR SPOs = Document. All ["POS"]. value;
If (! SPOs) SPOs = 0;
Document. All. onlinediv. scrolltop = SPOs ;
}
-->
</SCRIPT>
<Form ID = "form1" method = "Post" runat = "server">
//
<Asp: textboxId = "POS" style = "display: none"Runat = "server"> </ASP: textbox>
<Table>
<Tr>
<TD>
<DivId = "onlinediv" onscroll = "scrolldiv ();"Style = "overflow: auto; Height: 169px; width: 280px">
// Add (Treeview, word, more ....)
</Div>
</TD>
</Tr>
</Table>
</Form>
* Ondblclick = "javascript: Document. form1.submit ();" --- custom double-click event
* After the screen is full, the scroll bar is below
<Script language = "JavaScript">
Function Test ()
{
Window. Scroll (0, document. Body. scrollheight)
}
</SCRIPT>
<Body onload = "test ()">
</Body>