"JavaScript Package Library" Beta 5.0 release!

Source: Internet
Author: User
Tags api manual tagname

The JavaScript front-end Framework (package Library) Beta 5.0 was officially released on October 10, and today the API reference for Beta 5.0 is now available. Compared to the previous 5 releases are a cursory source code, and not many people involved, and the major blog on the source code processing is not very cold, resulting in the publication of the article to a large extent no one knows. So from this point forward, each release of the new version will provide the corresponding API manual, the purpose is to allow everyone to participate in, understand and use the framework. It is also my goal to simplify the steps that people develop in peacetime and to improve the efficiency of output.


The reference documentation is divided into 5 parts: 1. Main method document, 2. Library method documentation, 3. Plug-in library documentation, tool library documentation, sniffer documentation. Due to the large content system, and no one-time update is complete, currently only updated the Main method document, the other documents will be completed in a few days, please keep your attention. The current main method has been able to complete almost all the basic functions, everyone in the control of the document if there is any confusion or puzzled, please timely message, I will reply in the first time.


About the BETA 5.0 request, please move to my personal website to download, and provide other versions of the source code download and online demonstration, so that people more intuitive understanding of the framework each update what content, the current can do what degree.


BETA 5.0 seeks to fully compatible with the mainstream browser and IE6/7/8, but IE 6/7/8 will still have some obscure bug so everyone in the process of use, if found any BUG also please the first time to leave a message to me, I will in the future version to do my best to fix it!


At present, the media of cooperation are: Cnblogs, 51CTO, Iteye, CSDN and other 4 big network platform, I hope everyone actively participate in them, have any questions please leave a message!


My personal website address:http://www.shibuyi.net/

Demo of the BETA 5.0 online example address:http://www.shibuyi.net/demo/javascript/beta_5.0/



JavaScript Package Library BETA 5.0: Main method API reference documentation

API Name

Parameters Description Example

1. $ (positionerlist)

Positionerlist Optional [Object, String, method] Construction method $ (' #id ', '. class ', ' @name ', document)
2. $ (). Selector (positioner) Positioner required [string] Element Locator Selector $ (). Selector (' Div#id ')
3. $ (). GetId (IDs, Positioner) IDS required [string],positioner Optional [String, Object] Get ID element node $ (). GETID (' id ', document.body)
4. $ (). Gettagname (TagName, Positioner) TagName Required [string],positioner Optional [String, Object] Gets the tag element node $ (). Gettagname (' div ', ' #id ')
5. $ (). GetClass (ClassName, Positioner) ClassName Required [string],positioner Optional [String, Object] Get class element node $ (). GetClass (' class ', ' [email protected] ')
6. $ (). GetName (name, positioner) Name required [string],positioner Optional [String, Object] Gets the name element node $ (). GetName (' name ', ' Span.class ')
7. $ (). Getnodes () No Output all ELEMENT nodes $ (' #id ', '. class ', ' @fm '). Getnodes ()
8. $ (). Firstnode () No Get first element node $ (' Div.class '). Firstnode ()
9. $ (). Getfirstnode () No Output first element node $ (' Div.class '). Getfirstnode ()
Ten. $ (). Lastnode () No Get the bottom element node $ (' Span.class '). Lastnode ()
One. $ (). Getlastnode () No Output the bottom element node $ (' Span.class '). Getlastnode ()
$ (). Indexnode (Index) index must fill [positive integer] Get index element node $ (' div '). Indexnode (5)
$ (). Getindexnode (Index) index must fill [positive integer] Output index element node $ (' [email protected] '). Indexnode (0)
$ (). FirstChild () No Get first child element node $ (document.body). FirstChild ()
$ (). Getfirstchild () No Output first child element node $ (document.body). Getfirstchild ()
(). $ (). LastChild () No Get the last Seat element node $ (' [email protected] '). LastChild ()
(). $ (). Getlastchild () No Output End seat element node $ (' [email protected] '). Getlastchild ()
$ (). Allchild () No Get all child element nodes $ (' Span#id '). Allchild ()
$ (). Getallchild () No Output all child element nodes $ (' Span#id '). Getallchild ()
$ (). ParentNode () No Get parent element node $ (' #id '). ParentNode ()
$ (). Getparentnode () No Output parent Element node $ (' #id '). Getparentnode ()
$ (). Previousnode () No Get the front sibling node $ (' [email protected] '). Previousnode ()
$ (). Getpreviousnode () No Output Front sibling node $ (' [email protected] '). Getpreviousnode ()
$ (). NextNode () No Get the post-sibling node $ (' Div#id '). NextNode ()
$ (). Getnextnode () No Output post-sibling node $ (' Div#id '). Getnextnode ()
(). $ (). Bothnode () No Get front and rear sibling nodes $ (' #id '). Bothnode ()
$ (). Getbothnode () No Output front and rear sibling nodes $ (' #id '). Getbothnode ()
$ (). Allprevious () No Get all of the front-sibling nodes $ (' #id '). Allprevious ()
$ (). Getallprevious () No Output all previous sibling nodes $ (' #id '). Getallprevious ()
$ (). Allnext () No Get all the rear sibling nodes $ (' #id '). Allnext ()
$ (). Getallnext () No Output all rear sibling nodes $ (' #id '). Getallnext ()
(). $ (). Allboth () No Get all sibling nodes $ (' #id '). Allboth ()
(). $ (). Getallboth () No Output all sibling nodes $ (' #id '). Getallboth ()
$ (). HTML (String) string selection [strings] Gets and sets the element node content (including HTML) $ (' #id '). html (' text ')
$ (). Text (String) string selection [strings] Gets and sets the element node text $ (' #id '). Text (' Plain text ')
$ (). Value (String) string selection [strings] Get and set form element content $ (' #id '). Value (' form value ')
Notoginseng. $ (). DefaultValue (String) string selection [strings] Get and set FORM element default content $ (' #id '). DefaultValue ()
$ (). CSS (csslist) Csslist Optional [string] Get and set CSS styles $ (' #id '). CSS (' color: #333; ', ' background:red; ')
$ (). AddRule (Rulelist, ruleposition, Sheetindex) Rulelist required [array],ruleposition optional [positive integer],sheetindex optional [positive integer] Add CSS style rules $ (). AddRule ([' #box {color:red;} '], 0, 0)
(). $ (). Removerule (Nameposition, Sheetindex) Nameposition required [string, positive integer],sheetindex optional [positive integer] Remove CSS style rules $ (). Removerule (' #box ', 0, 0)
(). $ (). Bind (EventName, method, mode) EventName Required [string],method required [method],mode Optional [Boolean] Element Event Binding $ (document). Bind (' click ', Function () {}, True)
$ (). Loaded (method) Method required [Methods] HTML DOM Loading $ (). Loaded (function () {})
$ (). GetInfo (Sizeposition) Sizeposition Optional [string] Get element dimensions and orientation information $ (' #id '). GetInfo (' width ')
$ (). Scroll (x, y) x Optional [positive integer],y optional [positive integer] Get and set scroll bar $ (). Scroll (0, 0)
$ (). AddClass (Classlist) Classlist required [Array, string] Add Class Selector $ (' #id '). addclass (' A ', ' B ', ' C ')
$ (). Removeclass (Classlist) Classlist required [Array, string] Remove class Selector $ (' #id '). Removeclass (' A ', ' B ', ' C ')
$ (). Add (elementname, attributes, HTML) ElementName required [string],attributes Optional [Array, string],html fill [string] adding ELEMENT nodes $ (). Add (' div ', ' id=box ', ' new element ')
. $ (). Remove () No Delete Element node $ (' div '). Remove ()
$ (). Move (targetelement, mode) Targetelement required [Object, String],mode Optional [Boolean] Cut and copy ELEMENT nodes $ (' #id '). Move (' Span.class ', false)
$ (). GetLength () No Get total number of elements $ (' div '). GetLength ()
Wuyi $ (). Formall () No Get all form elements $ (). Formall ()
(). $ (). form (Index) Index must fill in [String, positive integer] Gets the specified form element $ (). form (' FM ')
(). $ (). Formchildall () No Get all Table list elements $ (' @fm '). Formchildall ()
Wu. $ (). Formchild (Index) Index must fill in [String, positive integer] Gets the specified table list element $ (' @fm '). Formchild (' username ')
$ (). AddOption (Optiontext, OptionValue, selected) Optiontext Required [string],optionvalue Optional [string],selected Optional [Boolean] New Option Element $ (' @select '). AddOption (' content ')
$ (). Removeoption (Index) index must fill [positive integer] Removing the Option element $ (' @select '). Removeoption (0)
$ (). Keepoption (length) length required [positive integer] Specify the number of Option elements to be retained $ (' @select '). Keepoption (1)
(). $ (). Optionall () No Get all Option elements $ (' @select '). Optionall ()
$ (). Plugins (MethodList) MethodList Required [Method] Loading plugins automatically $ (). Plugins (MethodName1, methodName2, MethodName3)


Please stay tuned!



This article from "Stone Not Easy Mood Blog" blog, please be sure to keep this source http://shibuyi.blog.51cto.com/9460768/1562475

"JavaScript Package Library" Beta 5.0 release!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.