为input类型的绑定输入事件

this.schemaChange = function(rowid){
var SCHEMA = "#" + rowid + "_" + "SCHEMA_CODE";
$(SCHEMA).bind("input propertychange", function (e) { //及时生效比keyDOWN好
var id = $(e.target).attr("rowid");
var schema = "#" + id + "_" + "SCHEMA_CODE";
var schemaName = "#" + id + "_" + "SCHEMA_NAME";
var name = $(schema).val();
$(schemaName).val(name);
});
}

this.dbChange = function(rowid){
var SCHEMA = "#" + rowid + "_" + "DB_CODE";
$(SCHEMA).bind("input propertychange", function (e) {
var id = $(e.target).attr("rowid");
var schema = "#" + id + "_" + "DB_CODE";
var schemaName = "#" + id + "_" + "DB_NAME";
var name = $(schema).val();
$(schemaName).val(name);
});
}

posted @ 2017-11-17 14:32  小春子60  阅读(788)  评论(0编辑  收藏  举报