有关文章的集合 MOZILLA 开发者网络 selection: MOZILLA DEVELOPER NETWORK document.activeElement MOZILLA DEVELOPER NETWORK HTMLTextAreaElement MOZILLA DEVELOPER NETWORK HTMLInputElement ie的document.selection对象…
如果你做过wysiwyg这样的app,一个很让人头疼的问题是如何保证执行bold,italic等格式化操作后保持先前鼠标所在的位置.要好好的解决这个问题,就必须将Selection和Range的api搞搞清楚. https://javascript.info/selection-range Selection and Range js可以获得当前的选中区域信息,可以选择或者去选择部分或者全部内容,清楚document中的选中部分,使用一个心的tag来进行包裹等操作.所有这些操作的基石就是Selc…
1. 极为重要的reference: [1] How selections works. http://bost.ocks.org/mike/selection/ [2] Nested selections. http://bost.ocks.org/mike/nest/ 2. 相关概念笔记 (1)Selections are usually seen as arrays of DOM elements, but it is not very accurate. There are two ma…
几个非常有用的links: [1] three little circles. http://bost.ocks.org/mike/circles/ [2] How selection works. http://bost.ocks.org/mike/selection/ [3] Thinking with join. http://bost.ocks.org/mike/join/ 具体而言,data()是用来将DOM element与数据进行绑定起来,其第二个参数可以用来specify当前的每…
文档碎片是什么 http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3 DocumentFragment is a "lightweight" or "minimal" Document object. It is very common to want to be able to extract a portion of a document's tree or to create…