资 源 简 介
This framework use to manage (insert, delete, update, select) json data in browser, it has syntax look like sql.
Support ajax, dom assistant, drag drop and virtual effect.
some example code:
```
//create new database
K.create.database({
fieldName : ["compare", "responseText", "responseXML"],
primaryKey: "compare",
ignoreError: true
});
```
```
//update data
oldRequest.Update({
responseText: xhr.responseText,
responseXML: xhr.responseXML,
where: "compare == "" + code + """
});
```
```
//select element in DOM
var aImg = K.select({
from: document.getElementById("kombai"),
where: "tagName =="IMG" && title == "copyright uoon""
});
```
```
//setup drag drop
K(newRow).initDragDrop({
onDrag: function() {
var self = this.self;
var event = this.event;
document.body.appendChild(self);
self.id = "m.o.b.i.l.e";
self.style.position = "absolute";
self.style.top = event.clientY - 5 + "px";
self.style.left = event.clientX + 5 + "px";
},
onDrop: function() {
var self = this.self;
self.removeAttri