public
Description: Yet Another Javascript framework
Homepage: http://jplus.nowazhu.com
Clone URL: git://github.com/nowa/jplus.git
Search Repo:
Click here to lend your support to: jplus and make a donation at www.pledgie.com !
加入base.js、dom.js
nowa (author)
Fri May 16 03:25:42 -0700 2008
commit  b6e6fe0171b021eb634a5801160c756dac75aecd
tree    7975abd95799b85016ce2669a748a5cccfd415e7
parent  559843130d643a6122b24ac6e7630a138e96e9f2
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -0,0 +1,16 @@
0
+Copyright (c) 2005-2008 Nowa(nowazhu@gmail.com)
0
+
0
+Permission is hereby granted, free of charge, to any person obtaining a copy
0
+of this software and associated documentation files (the "Software"), to deal
0
+in the Software without restriction, including without limitation the rights
0
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0
+copies of the Software, and to permit persons to whom the Software is
0
+furnished to do so, subject to the following conditions:
0
+
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0
+SOFTWARE.
...
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
0
@@ -0,0 +1,11 @@
0
+/* JPlus JavaScript framework, version <%= JPLUS_VERSION %>
0
+ * (c) 2008 nowa(nowazhu@gmail.com)、cricy(feiyelanghai@gmail.com)
0
+ *
0
+ * JPlus is based Prototype Javascript Framework,
0
+ * and freely distributable under the terms of an MIT-style license.
0
+ * For details, see the JPlus web site: http://jplus.welost.us/
0
+ *
0
+ * 这是一个Prototype、Ruby风格的框架,从它们里面借鉴了不少东西。其中的一些代码来自Prototype,感谢它的开发者们。
0
+ * 2008-05-16 Alimama, Hangzhou, China.
0
+ *
0
+ *--------------------------------------------------------------------------*/
0
\ No newline at end of file
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
0
@@ -0,0 +1,23 @@
0
+// 为Object对象添加继承方法
0
+Object.extend = function(destination, source) {
0
+ for (var property in source)
0
+ destination[property] = source[property];
0
+ return destination;
0
+};
0
+
0
+// 向Object添加自定义方法
0
+Object.extend(Object, {
0
+  
0
+  /**
0
+   * 检查对象是否是String
0
+   *
0
+   * @author from Prototype1.6
0
+   * @method isString
0
+   * @param {Object} object
0
+   * @return {Bool} true or false
0
+   */
0
+  isString: function(object) {
0
+   return typeof object == "string";
0
+  }
0
+  
0
+});
0
\ No newline at end of file
...
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
0
@@ -0,0 +1,7 @@
0
+//include 'HEADER'
0
+
0
+var JPlus = {
0
+  Version: '<%= JPLUS_VERSION %>',
0
+  
0
+  emptyFunction: function() { }
0
+}
0
\ No newline at end of file
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -0,0 +1,17 @@
0
+/**
0
+ * DOM相关
0
+ */
0
+
0
+
0
+function $(element) {
0
+ if (arguments.length > 1) {
0
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
0
+ elements.push($(arguments[i]));
0
+ return elements;
0
+ }
0
+ if (Object.isString(element))
0
+ element = document.getElementById(element);
0
+ return Element.extend(element);
0
+}
0
+
0
+var Element= {};
0
\ No newline at end of file

Comments

    No one has commented yet.