posted on 2005-06-24 18:02 birdshome 阅读(3867) 评论(18) 编辑 收藏 所属分类: Jscript&Dhtml开发
@宇义谢谢提醒,已修正:) 你的这个改进因该说还是不错的,效率上也不会有太大的差别。不过这里有个问题,我们在使用map的时候,如果知道了key,就更本不用遍历了,直接map[key]就能用了,遍历一般都是不知道key的时候使用。而且你这个name:value的对象,要使用也不是很方便,继续用我上面的objMap来作为例子。如果我知道了key为"abc",那么我直接:
但是如果使用你的方法,我知道了key为"abc",我需要这样来做:
是不是反而多此一举呢?当然了我不清楚你的context,也就望文生义了。
Note Setting the UNSELECTABLE attribute to off does not ensure that the element is selectable. One example is anHTMLApplication (HTA) with theSELECTIONattributeset to no. Elements in the body of theHTA cannotbe selected, whether the element's UNSELECTABLE attribute is setto off or not. Clicking on an element with the UNSELECTABLE attribute set to on does not destroy the current selection if one exists. An element with the UNSELECTABLE attribute set to oncanbe included in a selection that starts somewhere outside the element.The UNSELECTABLE attribute is implemented as anexpando.Setting theexpandoproperty of thedocumentobject to false precludes the functionality of allexpandos.
Powered by: 博客园 Copyright © birdshome