- 浏览: 88675 次
- 性别:
- 来自: 武汉
文章分类
最新评论
-
zhaohaolin:
哟,龙哥,你还搞C,好高大上的东西啊
xcode初探 -
robinqu:
又改了一些小错误~
[更新20100922]jQuery Location Select 插件- 地址联动、地理检测 -
robinqu:
kimm 写道这个功能不错,就是应用有点局限,内网就不好用了。 ...
[更新20100922]jQuery Location Select 插件- 地址联动、地理检测 -
robinqu:
更新了⋯⋯把代码重写了一次⋯⋯大家可以实现任何种类的联动,以及 ...
[更新20100922]jQuery Location Select 插件- 地址联动、地理检测 -
robinqu:
truth315 写道不好意思了,compu指的是getAre ...
JavaScript Prototype基础
Finding Elements in a Document
在文档中查找元素
document.documentElement 对应HTML标签,是documeng的根元素
document.body对应body标签,这个比html标签更常用
document.getElementByTagName()返回节点列表,包含具有该标签的元素;传递"15-"可返回所有标签,但这个特性在IE5、IE5中不可用
document.getElementById()返回具有该ID的节点
document.getElementByName()返回节点列表,包含具有该name属性的节点元素
Modifying a Document
修改文档
It is also possible to append, insert, delete, or replace text within a Text node with the appendData(), insertData(), deleteData(), and replaceData() methods.
appendChild()
createElement()
replaceChild()
setAttribute()
insertBefore()
以上方法可以实现追加子节点、创建元素、替换子节点、设置节点属性、前方插入节点等等;对应的还有对文字节点的数据替换、删除、附加等方法。
Working with Document Fragments
使用文档碎片
A DocumentFragment is a special type of node that does not appear in a document itself but serves as a temporary container for a sequential collection of nodes and allows those nodes to be manipulated as a single object.
createDocumentFragment()
when you are ready to add those nodes to the document, add the DocumentFragment itself
文档碎片document fragments,是一种特殊的节点,它本身不显示在文档总,但可以作为一种临时的节点容器。待其子元素修改好后,可以将该文档碎片添加到文档中,其效果会是文档碎片的子元素保持其结构不变的被添加到指定位置,而文档碎片对象并不存在。
document.createDocumentFragement() 方法可以创建一个文档碎片对象
Adding Content to a Document
向文档中添加内容
Document.createElement()
Document.createTextNode()
Node.appendChild(), Node.insertBefore(), and Node.replaceChild()
innerHTML
当读取一个HTML元素节点的innerHTML属性,你得到的是其所有子节点的HTML结构的代码。
当你处理大段的HTML代码,innerHTML属性是非常有用的。但注意+=操作符会让浏览器进行一个序列化操作和解析操作,这样会影响效率。
Element-creation utility functions
一个创建元素的工具函数:
Details about related Methods
相关方法的简介
Document.getElementById( ): find an element with the specified unique ID
Element getElementById(String elementId);
elementId : The value of the id attribute of the desired element.
Returns : The Element node that represents the document element with the specified id attribute or null if no such element is found.
Document.getElementsByTagName( ): return all Element nodes with the specified name
Element[] getElementsByTagName(String tagname);
tagname : The tag name of the Element nodes to be returned, or the wildcard string "*" to return all Element nodes in the document regardless of tag name. For HTML documents, tag names are compared in a case-insensitive fashion. (Prior to version 6, IE does not support this wildcard syntax.)
Returns : A read-only array (technically, a NodeList) of all Element nodes in the document tree with the specified tag name. The returned Element nodes are in the same order in which they appear in the document source. The NodeList is "live"i.e., its contents are automatically updated as necessary if elements with the specified tag name are added to or removed from the document.
HTMLDocument.getElementsByName( ): find elements with the specified name attribute
Element[] getElementsByName(String elementName);
elementName : The desired value for the name attribute.
Returns : A read-only array (technically a NodeList) of Element objects that have a name attribute with the specified value. If no such elements are found, the returned array is empty and has a length of 0.
Document.createComment( ): create a new Comment node
Comment createComment(String data);
data : The text of the Comment node to create.
Returns : A newly created Comment node, with the specified data as its text
Document.createDocumentFragment( ): create a new, empty DocumentFragment node
DocumentFragment createDocumentFragment( );
Returns : A newly created DocumentFragment node with no children.
Document.createElement( ): create a new Element node
Element createElement(String tagName)
tHRows DOMException;
tagName : The tag name of the Element to be created. Since HTML tags are case-insensitive, you may use any capitalization for HTML tag names. XML tag names are case-sensitive.
Returns : A newly created Element node with the specified tag name.
Throws : This method throws a DOMException with a code of INVALID_CHARACTER_ERR if tagName contains an illegal character.
Document.createTextNode( ): create a new Text node
Text createTextNode(String data);
data: The content of the Text node.
Returns: A newly created Text node that represents the specified data string.
Node: a node in a document tree
Subinterfaces: Attr, CDATASection, CharacterData, Comment, Document, DocumentFragment, DocumentType, Element, ProcessingInstruction, Text
Constants:
Node.ELEMENT_NODE = 1; // Element
Node.ATTRIBUTE_NODE = 2; // Attr
Node.TEXT_NODE = 3; // Text
Node.CDATA_SECTION_NODE = 4; // CDATASection
Node.PROCESSING_INSTRUCTION_NODE = 7; // ProcessingInstruction
Node.COMMENT_NODE = 8; // Comment
Node.DOCUMENT_NODE = 9; // Document
Node.DOCUMENT_TYPE_NODE = 10; // DocumentType
Node.DOCUMENT_FRAGMENT_NODE = 11; // DocumentFragment
Properties
readonly Attr[] attributes
readonly Node[] childNodes
readonly Node firstChild
readonly Node lastChild
readonly Node nextSibling
readonly String nodeName
String nodeValue
readonly Node parentNode
readonly Node previousSibling
All objects in a document tree (including the Document object itself) implement the Node interface, which provides the fundamental properties and methods for traversing and manipulating the tree.
Node.appendChild( ): insert a node as the last child of this node
Node appendChild(Node newChild)
tHRows DOMException;
newChild: The node to be inserted into the document. If the node is a DocumentFragment, it is not directly inserted, but each of its children are.
Returns: The node that was added.
Throws: This method may throw a DOMException with one of the following code values in the following circumstances: HIERARCHY_REQUEST_ERR, WRONG_DOCUMENT_ERR, NO_MODIFICATION_ALLOWED_ERR
Node.cloneNode( ): duplicate a node and, optionally, all of its descendants
Node cloneNode(boolean deep);
deep: If this argument is TRue, cloneNode( ) recursively clones all descendants of this node. Otherwise, it clones only this node.
Returns: A copy of this node.
Node.insertBefore( ): insert a node into the document tree before the specified node
Node insertBefore(Node newChild,
Node refChild)
throws DOMException;
newChild: The node to be inserted into the tree. If it is a DocumentFragment, its children are inserted instead.
refChild: The child of this node before which newChild is to be inserted. If this argument is null, newChild is inserted as the last child of this node.
Returns: The node that was inserted.
This method inserts the node newChild into the document tree as a child of this node. The new node is positioned within this node's childNodes[] array so that it comes immediately before the refChild node. If refChild is null, newChild is inserted at the end of childNodes[], just as with the appendChild( ) method. Note that it is illegal to call this method with a refChild that is not a child of this node.
Node.removeChild( ): remove (and return) the specified child of this node
Node removeChild(Node oldChild)
tHRows DOMException;
oldChild: The child node to remove.
Returns: The node that was removed.
Node.replaceChild( ): replace a child node with a new node
Node replaceChild(Node newChild,
Node oldChild)
throws DOMException;
newChild: The replacement node.
oldChild: The node to be replaced.
Returns: The node that was removed from the document and replaced.
This method replaces one node of the document tree with another. oldChild is the node to be replaced and must be a child of this node. newChild is the node that takes its place in the childNodes[] array of this node.
Element.getAttribute( ): return the string value of a named attribute
String getAttribute(String name);
name: The name of the attribute whose value is to be returned.
Returns: The value of the named attribute as a string. If the attribute is not defined, this method is supposed to return an empty string. Some implementations return null in this case, however.
Element.removeAttribute( ): delete a named attribute of an element
void removeAttribute(String name);
name: The name of the attribute to be deleted.
Throws: This method may throw a DOMException with a code of NO_MODIFICATION_ALLOWED_ERR if this element is read-only and does not allow its attributes to be removed.
Element.setAttribute( ): create or change an attribute of an element
void setAttribute(String name,
String value)
throws DOMException;
name: The name of the attribute to be created or modified.
value: The string value of the attribute.
This method sets the specified attribute to the specified value. If no attribute by that name already exists, a new one is created.
在文档中查找元素
引用
The document.documentElement property refers to the <html> tag that serves as the root element of the document.
the document.body property refers to the <body> tag which is more commonly useful than its <html> parent.
getElementsByTagName() selects the first element of the returned array.
if you pass the special string "15-" to getElementsByTagName(), it returns a list of all elements in the document, in the order in which they appear
This special usage is not supported in IE 5 and IE 5.5. See instead the IE-specific HTMLDocument.all[]
getElementById() retruns a Node
getElementByName() returns a NodeList
the document.body property refers to the <body> tag which is more commonly useful than its <html> parent.
getElementsByTagName() selects the first element of the returned array.
if you pass the special string "15-" to getElementsByTagName(), it returns a list of all elements in the document, in the order in which they appear
This special usage is not supported in IE 5 and IE 5.5. See instead the IE-specific HTMLDocument.all[]
getElementById() retruns a Node
getElementByName() returns a NodeList
document.documentElement 对应HTML标签,是documeng的根元素
document.body对应body标签,这个比html标签更常用
document.getElementByTagName()返回节点列表,包含具有该标签的元素;传递"15-"可返回所有标签,但这个特性在IE5、IE5中不可用
document.getElementById()返回具有该ID的节点
document.getElementByName()返回节点列表,包含具有该name属性的节点元素
Modifying a Document
修改文档
引用
It is also possible to append, insert, delete, or replace text within a Text node with the appendData(), insertData(), deleteData(), and replaceData() methods.
appendChild()
createElement()
replaceChild()
setAttribute()
insertBefore()
以上方法可以实现追加子节点、创建元素、替换子节点、设置节点属性、前方插入节点等等;对应的还有对文字节点的数据替换、删除、附加等方法。
Working with Document Fragments
使用文档碎片
引用
A DocumentFragment is a special type of node that does not appear in a document itself but serves as a temporary container for a sequential collection of nodes and allows those nodes to be manipulated as a single object.
createDocumentFragment()
when you are ready to add those nodes to the document, add the DocumentFragment itself
文档碎片document fragments,是一种特殊的节点,它本身不显示在文档总,但可以作为一种临时的节点容器。待其子元素修改好后,可以将该文档碎片添加到文档中,其效果会是文档碎片的子元素保持其结构不变的被添加到指定位置,而文档碎片对象并不存在。
document.createDocumentFragement() 方法可以创建一个文档碎片对象
Adding Content to a Document
向文档中添加内容
Document.createElement()
Document.createTextNode()
Node.appendChild(), Node.insertBefore(), and Node.replaceChild()
innerHTML
引用
When you query the value of this property for an HTML element, what you get is a string of HTML text that represents the children of the element.
It turns out that using innerHTML is a reasonably efficient thing to do, especially when working with large chunks of HTML text to be parsed. Note, however that appending bits of text to the innerHTML property with the += operator is usually not efficient because it requires both a serialization step and a parsing step.
It turns out that using innerHTML is a reasonably efficient thing to do, especially when working with large chunks of HTML text to be parsed. Note, however that appending bits of text to the innerHTML property with the += operator is usually not efficient because it requires both a serialization step and a parsing step.
当读取一个HTML元素节点的innerHTML属性,你得到的是其所有子节点的HTML结构的代码。
当你处理大段的HTML代码,innerHTML属性是非常有用的。但注意+=操作符会让浏览器进行一个序列化操作和解析操作,这样会影响效率。
Element-creation utility functions
一个创建元素的工具函数:
/** * make(tagname, attributes, children): * create an HTML element with specified tagname, attributes, and children. * * The attributes argument is a JavaScript object: the names and values of its * properties are taken as the names and values of the attributes to set. * If attributes is null, and children is an array or a string, the attributes * can be omitted altogether and the children passed as the second argument. * * The children argument is normally an array of children to be added to * the created element. If there are no children, this argument can be * omitted. If there is only a single child, it can be passed directly * instead of being enclosed in an array. (But if the child is not a string * and no attributes are specified, an array must be used.) * * Example: make("p", ["This is a ", make("b", "bold"), " word."]); * * Inspired by the MochiKit library (http://mochikit.com) by Bob Ippolito */ function make(tagname, attributes, children) { // If we were invoked with two arguments, the attributes argument is // an array or string; it should really be the children arguments. if (arguments.length == 2 && (attributes instanceof Array || typeof attributes == "string")) { children = attributes; attributes = null; } // Create the element var e = document.createElement(tagname); // Set attributes if (attributes) { for(var name in attributes) e.setAttribute(name, attributes[name]); } // Add children, if any were specified. if (children != null) { if (children instanceof Array) { // If it really is an array for(var i = 0; i < children.length; i++) { // Loop through kids var child = children[i]; if (typeof child == "string") // Handle text nodes child = document.createTextNode(child); e.appendChild(child); // Assume anything else is a Node } } else if (typeof children == "string") // Handle single text child e.appendChild(document.createTextNode(children)); else e.appendChild(children); // Handle any other single child } // Finally, return the element. return e; } /** * maker(tagname): return a function that calls make() for the specified tag. * Example: var table = maker("table"), tr = maker("tr"), td = maker("td"); */ function maker(tag) { return function(attrs, kids) { if (arguments.length == 1) return make(tag, attrs); else return make(tag, attrs, kids); } }
Details about related Methods
相关方法的简介
Document.getElementById( ): find an element with the specified unique ID
Element getElementById(String elementId);
elementId : The value of the id attribute of the desired element.
Returns : The Element node that represents the document element with the specified id attribute or null if no such element is found.
Document.getElementsByTagName( ): return all Element nodes with the specified name
Element[] getElementsByTagName(String tagname);
tagname : The tag name of the Element nodes to be returned, or the wildcard string "*" to return all Element nodes in the document regardless of tag name. For HTML documents, tag names are compared in a case-insensitive fashion. (Prior to version 6, IE does not support this wildcard syntax.)
Returns : A read-only array (technically, a NodeList) of all Element nodes in the document tree with the specified tag name. The returned Element nodes are in the same order in which they appear in the document source. The NodeList is "live"i.e., its contents are automatically updated as necessary if elements with the specified tag name are added to or removed from the document.
HTMLDocument.getElementsByName( ): find elements with the specified name attribute
Element[] getElementsByName(String elementName);
elementName : The desired value for the name attribute.
Returns : A read-only array (technically a NodeList) of Element objects that have a name attribute with the specified value. If no such elements are found, the returned array is empty and has a length of 0.
Document.createComment( ): create a new Comment node
Comment createComment(String data);
data : The text of the Comment node to create.
Returns : A newly created Comment node, with the specified data as its text
Document.createDocumentFragment( ): create a new, empty DocumentFragment node
DocumentFragment createDocumentFragment( );
Returns : A newly created DocumentFragment node with no children.
Document.createElement( ): create a new Element node
Element createElement(String tagName)
tHRows DOMException;
tagName : The tag name of the Element to be created. Since HTML tags are case-insensitive, you may use any capitalization for HTML tag names. XML tag names are case-sensitive.
Returns : A newly created Element node with the specified tag name.
Throws : This method throws a DOMException with a code of INVALID_CHARACTER_ERR if tagName contains an illegal character.
Document.createTextNode( ): create a new Text node
Text createTextNode(String data);
data: The content of the Text node.
Returns: A newly created Text node that represents the specified data string.
Node: a node in a document tree
Subinterfaces: Attr, CDATASection, CharacterData, Comment, Document, DocumentFragment, DocumentType, Element, ProcessingInstruction, Text
Constants:
Node.ELEMENT_NODE = 1; // Element
Node.ATTRIBUTE_NODE = 2; // Attr
Node.TEXT_NODE = 3; // Text
Node.CDATA_SECTION_NODE = 4; // CDATASection
Node.PROCESSING_INSTRUCTION_NODE = 7; // ProcessingInstruction
Node.COMMENT_NODE = 8; // Comment
Node.DOCUMENT_NODE = 9; // Document
Node.DOCUMENT_TYPE_NODE = 10; // DocumentType
Node.DOCUMENT_FRAGMENT_NODE = 11; // DocumentFragment
Properties
readonly Attr[] attributes
readonly Node[] childNodes
readonly Node firstChild
readonly Node lastChild
readonly Node nextSibling
readonly String nodeName
String nodeValue
readonly Node parentNode
readonly Node previousSibling
All objects in a document tree (including the Document object itself) implement the Node interface, which provides the fundamental properties and methods for traversing and manipulating the tree.
Node.appendChild( ): insert a node as the last child of this node
Node appendChild(Node newChild)
tHRows DOMException;
newChild: The node to be inserted into the document. If the node is a DocumentFragment, it is not directly inserted, but each of its children are.
Returns: The node that was added.
Throws: This method may throw a DOMException with one of the following code values in the following circumstances: HIERARCHY_REQUEST_ERR, WRONG_DOCUMENT_ERR, NO_MODIFICATION_ALLOWED_ERR
Node.cloneNode( ): duplicate a node and, optionally, all of its descendants
Node cloneNode(boolean deep);
deep: If this argument is TRue, cloneNode( ) recursively clones all descendants of this node. Otherwise, it clones only this node.
Returns: A copy of this node.
Node.insertBefore( ): insert a node into the document tree before the specified node
Node insertBefore(Node newChild,
Node refChild)
throws DOMException;
newChild: The node to be inserted into the tree. If it is a DocumentFragment, its children are inserted instead.
refChild: The child of this node before which newChild is to be inserted. If this argument is null, newChild is inserted as the last child of this node.
Returns: The node that was inserted.
This method inserts the node newChild into the document tree as a child of this node. The new node is positioned within this node's childNodes[] array so that it comes immediately before the refChild node. If refChild is null, newChild is inserted at the end of childNodes[], just as with the appendChild( ) method. Note that it is illegal to call this method with a refChild that is not a child of this node.
Node.removeChild( ): remove (and return) the specified child of this node
Node removeChild(Node oldChild)
tHRows DOMException;
oldChild: The child node to remove.
Returns: The node that was removed.
Node.replaceChild( ): replace a child node with a new node
Node replaceChild(Node newChild,
Node oldChild)
throws DOMException;
newChild: The replacement node.
oldChild: The node to be replaced.
Returns: The node that was removed from the document and replaced.
This method replaces one node of the document tree with another. oldChild is the node to be replaced and must be a child of this node. newChild is the node that takes its place in the childNodes[] array of this node.
Element.getAttribute( ): return the string value of a named attribute
String getAttribute(String name);
name: The name of the attribute whose value is to be returned.
Returns: The value of the named attribute as a string. If the attribute is not defined, this method is supposed to return an empty string. Some implementations return null in this case, however.
Element.removeAttribute( ): delete a named attribute of an element
void removeAttribute(String name);
name: The name of the attribute to be deleted.
Throws: This method may throw a DOMException with a code of NO_MODIFICATION_ALLOWED_ERR if this element is read-only and does not allow its attributes to be removed.
Element.setAttribute( ): create or change an attribute of an element
void setAttribute(String name,
String value)
throws DOMException;
name: The name of the attribute to be created or modified.
value: The string value of the attribute.
This method sets the specified attribute to the specified value. If no attribute by that name already exists, a new one is created.
发表评论
-
WebApp在移动端的涅盘- 另类的移动端应用程序开发
2010-09-27 22:35 4481同时欢迎到我的BLOG讨 ... -
ScriptDoc的Notation规则
2010-01-23 19:37 1759这个还是蛮重要的,以前就一直很羡慕Java有一套标准来着: 转 ... -
关于google.setOnLoadCallback()的一点研究
2010-01-12 10:01 6118google.setOnLoadCallback()是goog ... -
ECMA 推出 JavaScript 5
2009-12-28 21:17 1613转发自http://www.comsharp.co ... -
Javascript 事件编程 (二)
2009-09-18 21:28 1600Event Handlers and the this Key ... -
Javascript 事件编程 (一)
2009-09-04 15:27 1236Events and Event Handling 事件和事件 ... -
Javascript CSS编程 (一)元素定位、透明、内联样式
2009-09-03 14:29 2047Querying Element Position and S ... -
Javascript CSS编程 (二)Computed Styles、Class修改、操作样式表
2009-09-03 13:15 5308Scripting Computed Styles 计算样式 ... -
Javascript DHTML动画
2009-09-03 13:00 1201JS实现的动画效果多半 ... -
Javascript IE4 DOM
2009-09-02 17:14 997很多IE独有的DOM特性是沿袭自IE4的,所以有必要看看IE4 ... -
Javascript 操控选择文本
2009-09-02 17:02 1242Querying Selected Text 查询选择的文本 ... -
Javascript 窗口的几何关系和相关方法、属性
2009-09-02 10:47 1109Window Geometry 窗口几何关系 引用Scree ... -
JavaScript window下面的常用函数、属性
2009-09-02 10:30 1139我们常用的一些函数都是全局对象window下面的。这里将其梳理 ... -
JavaScript 在浏览器中的相关概念:执行环境、引入脚本、安全策略等
2009-09-02 09:32 1358The Window as Global Execution ... -
JavaScript Namespace模拟
2009-07-15 18:53 1541做JavaScript的大型项目比较痛苦,它没有namespa ... -
JavaScript Class模拟深入 - Duck Typing 和 Class相关的工具类
2009-07-15 17:16 1759Duck Typing 引用If it implements ... -
JavaScript 判定对象类型
2009-07-15 16:53 1345判定JS的对象类型基本 ... -
JavaScript Class模拟深入 - 继承、子类
2009-07-15 16:27 1696Superclasses and Subclasses ... -
javascript this 关键字小提示
2009-07-14 22:01 1159来自:http://www.macji.com/2009/01 ... -
JavaScript Class模拟基础
2009-07-14 16:39 1103Simulating Classes in JavaScrip ...
相关推荐
双击和平移添加了事件侦听器,此外还可以选择提供: 用于控制平移和缩放行为JavaScript API onPan和onZoom事件处理程序屏幕上的缩放控件它可以跨浏览器运行,并且支持内联SVG和HTML object或embed元素中的SVG。...
寻找2.0文档? 安装 yarn add react-resize-aware 或使用npm: npm install --save react-resize-aware 用法 该API简单但功能强大, useResizeAware 返回一个您将放置在被测元素内的React节点,以及一个包含其大小...
当寻找禁用页面缩放的方法时,我经常发现解决方案可以覆盖Ctrl + mousewheel , Ctrl + +或Ctrl + -事件。 该插件使用了完全不同的方法。 window.devicePixelRatio是一个window属性,用于返回设备的物理像素分辨率与...
2.4.2 寻找DOM节点 2.4.3 创建DOM节点 2.4.4 为文档增加样式 2.4.5 捷径:使用innerHTML属性 2.5 使用XML技术异步加载数据 2.5.1 IFrame 2.5.2 XMLDocument和XMLHttpRequest对象 2 5.3 向服务器发送请求 2.5.4 使用...
##学习目标 在本项目结束时,员工将能够: 向页面添加 css 和 javascript 资源使用 jquery API 查找 html 元素并附加点击事件使用 jquery API 查找 html 元素更改其内容使用 Leafletjs API 执行基本命令##参考/工具...
因此,我决定创建一个信息存储库,以帮助我和任何其他寻找此类信息的人。 它涵盖了以下内容: 适用什么 。 应用什么键盘功能。 标记以及某些情况下CSS代码示例。 禁用JavaScript会发生什么。 可用的示例。 ...
有关正在进行的文档和信息,请参阅 。 VibeJS 一个基于小组件的 JavaScript 库,用于构建用户界面和应用程序。 如果您正在寻找替代 VueJS 和 React 等大型库且学习曲线更简单的替代方案,那么 VibeJS 可能正是您所...
碳设计系统 Carbon是IBM构建的开源设计系统。 该系统以IBM设计语言为基础,由...有关完整的操作方法文档和指南,请参见的文档站点。 :为此仓库做出贡献的准则。 :female_sign_selector: 迁移指南 :raising_hands:
此仓库是一系列不同的场景和情况,将帮助我学习各种CSS和Javascript概念。 页数 页面01:事件冒泡 我创建了一个小动画,并尝试切换一个会隐藏和显示一些div的类 通过单击容器div或文档主体可以隐藏div,但是不会发生...
DoneJS是以下技术的组合: -ES6,CJS和AMD模块加载器和构建器 —自定义元素和模型-视图-视图模型(MVVM)实用程序 — DOM帮助器 —扩展的DOM帮助器或 —断言库 —功能测试或-测试运行 —文档 — CanJS的服务器端...
该库提供3个主要功能: 更改默认滚动的行为以获得更平滑的效果快速,灵活地向页面上的任何元素添加可自定义的视差效果向绑定到滚动状态的场景添加任何行为(自定义转换,寻找动画…) 签出!文献资料该文档位于此处...
官方详细的文档是寻找 HTML5 特性的最好地方,当然你还可以轻松通过 W3Schools 来学习HTML5 标签。我们将会在文章中涉及到以下的特性: • 语义化标记 • Form 表单增强功能 • 视频 / 音频 • 画布(Canvas) • 可...
contextMenu自由定制页面元素的右键菜单。是的同类的插件很多,作者造轮子是因为当初寻找右键菜单插件的时候,找了几个都有bug,要么经不起环境的考验,只能跑通demo。如果你也在寻找一款右键菜单插件,不如试试这一...
1、总是使用#id去寻找element. 在jQuery中最快的选择器是ID选择器 ($(‘#someid’)). 这是因为它直接映射为JavaScript的getElementById()方法。 选择单个元素 <form method=post action=/> <h2>Traffic ...
在寻找v3文档? 去。产品特点使用React v16及其官方API创建门户对React v15有一个备用将其子级传送到新的React Portal中,该门户默认情况下附加到document.body 可以定位用户指定的DOM元素支持服务器端渲染支持返回...
通过随时随地收听文档中的事件来添加快捷方式 这是Vue 2的版本,如果您正在寻找Vue 3的版本, 赞助商 青铜 安装 npm install vue-global-events 理念 由于Vue的事件修饰符,处理事件非常容易,但是,您仅限于DOM...
导航树导航 :police_car_light: :police_car_light: 需要一个新的维护者 :police_car_light: :...元素提供了有意义的类以使自定义变得舒适(例如NavigationItem--active , NavigationLevel--level-1 , Navigati
您可能正在寻找使用它的样式框架: 将您的项目添加到此列表! 我们希望与您合作采用OptiCSS。 总体。 这是一个monorepo,各种软件包中提供了不同的文档: 公共API和库: 这些程序包是我们期望其他程序包具有依赖...
WriteOn 适用于正在寻找干净、一致和安全的写作体验的故事创作者和作家,以帮助您在网络上撰写和发布您的故事、文章、文档和文件。垫(编辑器) 支持降价内联格式菜单,如在 Medium 上找到的那些一、安装1.1 带有id...
50 多个 UI 元素 3000 + CSS 变量 3 级变量继承(类似于 SublimeText) 使用 EM 值构建响应式设计 Semantic UI 现在是 1.0,请务必查看我们的以了解预发行版的更改。 社区支持 想了解语义? 加入以获得支持和项目...