有一个想法,你在数据库里加一个字段.记录下位置比如50
点击按钮后.你查找相应的节点上位置字段的值 ,用JS把滚动条移到此外,JS语句以前看到过,忘了!!
适用树的结构不变化这样的情况!
点击按钮后.你查找相应的节点上位置字段的值 ,用JS把滚动条移到此外,JS语句以前看到过,忘了!!
适用树的结构不变化这样的情况!
解决方案 »
- 新手,各位大侠帮帮忙,指教指教呀~~~
- 如何在Configsections节中加Section,并给name赋值,如何给type属性赋值?
- CSDN为何如此之慢(ver 2008.10)?谈谈哪些手段能改善当前状况!同时散分!
- gridview 里面如何进行修改删除
- 2.0中自带的用户验证
- 在.NET 2.0 中使用类库中的Mail类发信,实际是用 CDOSYS组件来发的,它只一个封状???
- 谁有用 HttpModule 写的认证程序??要完整的,不要网上的例子 谢谢
- 项目合作
- 谁有ASP.NET揭秘(第二版) 的C#源代码?
- 急求MapX for B/S结构的控件
- 如何将用request.form获取的值转换成int型?
- calendar控件中动态生成的按钮,事件为何执行不了?高分请教!!
var IE4 = (document.all);var win = window; // window to search.
var n = 0;function findInPage(str) { var txt, i, found; if (str == "")
return false; // Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary. if (NS4) { // Look for match starting at the current point. If not found, rewind
// back to the first match. if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++; // If not found in either direction, give message. if (n == 0)
alert("Not found.");
} if (IE4) {
txt = win.document.body.createTextRange(); // Find the nth match from the top of the page. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
} // If found, it and scroll it into view. if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
} // Otherwise, start over at the top of the page and find first match. else {
if (n > 0) {
n = 0;
findInPage(str);
} // Not found anywhere, give message. else
alert("Not found.");
}
} return false;
}</script><form name="search" onSubmit="return findInPage(this.string.value);">
<font size=3><input name="string" type="text" size=15 onChange="n = 0;"></font>
<input type="submit" value="Find">
</form>
http://lucky.myrice.com/javascriptexam/index.html