DOM Elements Creator
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/DOMEC
软件介绍
What is it?
DOM Elements Creator is a simple plugin for creating DOM elements on-a-fly which can be used as part of jQuery statements.
When you want to create new DOM element in pure jQuery you must use document.createElement() method and then new element must be wrapped in $() before it can be used in jQuery context. You can also use HTML code as a selector to create a new object but this way requires writing HTML, which is rarely comfortable. And you must also remember to espace any quotes.
This plugin provides more elegant way to achieve the same effect and requires writting less code.
How to use it?
Just import plugin file after importing the jQuery library and you're set.
Syntax:
$.create(element[, attributes[, children]])
Parameters:
- string
element- name of the element to create - object|array
attributes- element properties to be set, you shouln't use events attributes here such as onclick, onmouseover etc. since they won't work - string|array
children- child elements (could also contain text value)
Example:
- JavaScript/jQuery approach:
var div = document.createElement('div');
$(div).attr('id', 'myId').text('myText').appendTo('#myElem'); - standard jQuery approach:or
$('<div>').attr('id', 'myId').text('myText').appendTo('#myElem');$('<div id="myId">myText</div>').appendTo('#myElem'); - plugin approach:
$.create('div', {'id': 'myId'}, 'myText').appendTo('#myElem');
Incompatible changes
0.3
Plugin function was renamed from $.new to $.create to fix issues on Internet Explorer.
物联网导论(第2版)
刘云浩 / 科学出版社 / 2013-8 / 45.00元
物联网是一个基于互联网、传统电信网等信息承载体,让所有能够被独立寻址的普通物理对象实现互联互通的网络。它具有普通对象设备化、自治终端互联化和普适服务智能化三个重要特征。 《物联网工程专业系列教材:物联网导论(第2版)》从物联网的感知识别层、网络构建层、管理服务层和综合应用层这四层分别进行阐述,深入浅出地为读者拨开萦绕于物联网这个概念的重重迷雾,引领求知者渐渐步入物联网世界,帮助探索者把握第三......一起来看看 《物联网导论(第2版)》 这本书的介绍吧!
