用锚
<a name="here"></a><a href="here">goto</a>
<a name="here"></a><a href="here">goto</a>
解决方案 »
- 循环对象时,有关switch的一些疑惑
- js 数组 递归
- 选中select
- 在IE中,如何使用JS删除DOM对象的属性?
- javascript最好的测试环境是什么呢?在ie和firefox中有什么典型的不同呢
- js下拉列表和ul之间传值问题???
- 一个很简单的问题,请大家帮忙.在线等!急!
- 100分求助javascript里如何屏蔽掉的IE关闭按钮
- 请问:点击表格中单元格使其变为输入框做法的相关内容?(请大家给点建议!)谢谢!!
- 急!!请问为什么在prompt框中键入中文字符后,alert框中的后继字符不能显示呢?
- html文档中多个script标签之间的联系
- 请问大家验证numeric(9,3)的正则怎么写啊?
scrollIntoView Method Internet Development Index --------------------------------------------------------------------------------Causes the object to scroll into view, aligning it either at the top or bottom of the window. Syntaxobject.scrollIntoView( [bAlignToTop])
ParametersbAlignToTop Optional. Boolean that specifies one of the following values: true Default. Scrolls the object so that top of the object is visible at the top of the window.
false Scrolls the object so that the bottom of the object is visible at the bottom of the window.
Return ValueNo return value.ResThe scrollIntoView method is useful for immediately showing the user the result of some action without requiring the user to manually scroll through the document to find the result.Depending on the size of the given object and the current window, this method might not be able to put the item at the very top or very bottom, but will position the object as close to the requested position as possible.ExampleThis example uses the scrollIntoView method to underline the content of the document's fifth paragraph and scroll it into view at the top of the window.SHOWExample var coll = document.all.tags("P");
if (coll.length >= 5)
{
coll(4).style.textDecoration = "underline";
coll(4).scrollIntoView(true);
}
Standards InformationThere is no public standard that applies to this method. Applies To[ Object Name ]
Platform Version
Win16:
Win32:
Windows CE:
Unix:
Mac:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ADDRESS, APPLET, AREA, B, BIG, BLOCKQUOTE, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, controlRange, CUSTOM, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TextRange, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, WBR, XMP
Move the mouse pointer over an element in the Applies To list to display availability information for the listed platforms.
name要符合标识符的要求,首字符不能用数字可以用脚本实现滚动
<TD vAlign="top" align="left"><A name="a1">问:</A></TD>document.getElementById("a1").scrollIntoView();
var a=document.createElement("A");
a.style.display="none";
a.href="#1"
document.body.appendChild(a);
a.click();
</script>
hbhbhbhbhb1021(天外水火(我要多努力))
谢谢