1,offsetTop是什么?
相对于其上一级的top距离2,TextRange是什么? document.selection是什么?
TextRange Object
Represents text in an HTML element.
document.selection是当前所选择3,collapse方法是什么用处??
设置插入点,即输入文字的开始
Moves the insertion point to the beginning or end of the current range. SyntaxTextRange.collapse([bStart])ParametersbStart Optional. Boolean that specifies one of the following values: true Default. Moves the insertion point to the beginning of the text range.
false Moves the insertion point to the end of the text range.
4,什么是expando属性??
没听过,还是说expand方法?5,怎么样给元素指定一个clicked属性,表示被click?
onclick=this.clicked=true6.怎么通过ParamentElement来获得选定元素的父元素?
onclick=alert(event.srcElement.parentElement)
相对于其上一级的top距离2,TextRange是什么? document.selection是什么?
TextRange Object
Represents text in an HTML element.
document.selection是当前所选择3,collapse方法是什么用处??
设置插入点,即输入文字的开始
Moves the insertion point to the beginning or end of the current range. SyntaxTextRange.collapse([bStart])ParametersbStart Optional. Boolean that specifies one of the following values: true Default. Moves the insertion point to the beginning of the text range.
false Moves the insertion point to the end of the text range.
4,什么是expando属性??
没听过,还是说expand方法?5,怎么样给元素指定一个clicked属性,表示被click?
onclick=this.clicked=true6.怎么通过ParamentElement来获得选定元素的父元素?
onclick=alert(event.srcElement.parentElement)
解决方案 »
- 求教---JS無法打開Excel文件
- struts2+javascript 刷新页面后,输入框中的内容没有被清除
- 雪地里跪求:fckEditor增加功能,代码高亮,解析word文档
- jquery控制行的显示隐藏
- 关于从https跳至http时session丢失的问题(再发)?
- 不用弹出窗口,怎么关闭ie的工具栏、地址栏、菜单等?
- 修改滚动的一个方向,谁会?
- 求验证输入框中仅能输入数字(含小数点)的js代码
- 如何将页面上的图片自动插入到WORD文档中
- 关于Ext中form、Grid、Paggingtoolbar的关系的问题
- js中的getAttribute是怎么用 的?
- 如何控制按钮的出现?急!谢谢!
YOU CAN DO IT. CHECK FROM MSDN.
expando 属性 ?????技巧 9:使用数据绑定来提供丰富的客户端数据视图。
不要在 document 对象中设置 expando 属性
expando (英文)属性可以添加至任何对象。此属性非常有用,它可
以存储当前 Wed页面内的信息,并提供了另一种扩展 DHTML对象模型的方
法。例如,您可以给 DHTML元素指定一个 clicked属性,用此属性提示用
户已经单击了哪一个元素。在引发事件时,也可以使用 expando属性,向
事件处理函数提供更多的上下文信息。无论您如何使用 expando属性,切
记不要在 document (英文)对象上设置它们。如果您这样做,则当您访
问该属性时,文档必须执行额外的重算操作。
技巧 10:在 window(英文)对象上设置 expando 属性。
慢:
for (var i=0; i<1000; i++)
{
var tmp;
window.document.myProperty = "第 " + i + " 项";
tmp = window.document.myProperty;
}
快:
for (var i=0; i<1000; i++)
{
var tmp;
window.myProperty = "第 " + i + " 项";
tmp = window.myProperty;
}
以前老这么用,但不知道叫这个名字。
document 下的属性太多了,所以会慢.