$colacola.AbstractButtoncola.AbstractCheckboxcola.AbstractContainercola.AbstractDropdowncola.AbstractEditorcola.AbstractInputcola.AbstractItemGroupcola.AbstractListcola.AbstractMenuItemcola.AbstractSlotListcola.AjaxValidatorcola.AsyncValidatorcola.Avatarcola.Breadcrumbcola.Buttoncola.ButtonGroupcola.Calendarcola.CardBookcola.Carouselcola.CascadeBindcola.Checkboxcola.ControlMenuItemcola.Cornercola.CustomDropdowncola.CustomValidatorcola.DataTypecola.DatePickercola.DateTimePickercola.Dialogcola.Dividercola.Dropdowncola.DropdownMenuItemcola.Elementcola.EmailValidatorcola.Entitycola.EntityDataTypecola.EntityListcola.FieldSetcola.GroupBoxcola.HeaderMenuItemcola.IFramecola.Imagecola.Inputcola.ItemsViewcola.Labelcola.Layercola.LengthValidatorcola.Linkcola.ListViewcola.Menucola.MenuButtoncola.MenuItemcola.Modelcola.MultiSlotPickercola.NestedListcola.NestedListBindcola.NestedListNodecola.Nodecola.NumberValidatorcola.Panelcola.PointingLabelcola.Progresscola.Propertycola.Providercola.RadioButtoncola.RadioGroupcola.RangeSlotListcola.Ratingcola.RegExpValidatorcola.RenderableElementcola.RequiredValidatorcola.Revealcola.Ribboncola.Segmentcola.Selectcola.Sidebarcola.Slidercola.SlotListcola.SplitPanecola.Stackcola.Stepscola.Tabcola.TabButtoncola.Tablecola.TableColumncola.TableContentColumncola.TableDataColumncola.TableGroupColumncola.TableSelectColumncola.Tagcola.TimeLinecola.TitleBarcola.Togglecola.Treecola.TreeNodecola.TreeNodeBindcola.UrlValidatorcola.Validatorcola.Widgetcola.breadcrumb.Sectioncola.buttonGroup.Separatorcola.steps.Stepcola.tab.AbstractTabButtoncola.utilcola.util.KeyedArray
xCreate利用JSON快速创建DOM$
Parameters:
  • configjson || [json] || string

    如果直接传入一段字符串,xCreate并不会将其解释成HTML,而是会把它原样的渲染成DOM的TextNode。

  • contextjson

    假设我们在定义JSON的时候在某些对象中植入一些contextKey的属性定义,那么xCreeat会将带有contextKey的相应的DOM子对象的实例保存在context中。例如: var context = {}; $.xCreate({ tagName: "div", context: { tagName: "i", contextKey: "icon" } }, context); // 此时context.icon即为上面创建的元素

Returns:HTMLElement || [HTMLElement]
xCreate方法的目的是通过JSON来定义HTML,以方便开发者在Javascript中创建DOM。
参考:xCreate
xAppendjQuery扩展,根据JSON创建DOM元素并添加到当前jQuery包装的DOM中。$
Parameters:
  • configjson || [json] || string

    以JSON或JSON数组形式定义的DOM元素。

  • contextjson

Returns:jQuery
例如:

$(body).xAppend({
  tagName: "button",
  context: "Test"
});

xInsertBeforejQuery扩展,根据JSON创建DOM元素并添加到当前jQuery包装的DOM之前。$
Parameters:
  • configjson || [json] || string

    以JSON或JSON数组形式定义的DOM元素。

  • contextjson

Returns:jQuery
xInsertAfterjQuery扩展,根据JSON创建DOM元素并添加到当前jQuery包装的DOM之后。$
Parameters:
  • configjson || [json] || string

    以JSON或JSON数组形式定义的DOM元素。

  • contextjson

Returns:jQuery