jQuery(function(){
jQuery("#tx1").blur(function(){
var id = jQuery(this).attr("value");;
BookBiz.findById(id, function(book){
if(book==null){
jQuery("#sp1").text("没有该图书,可以添加");
return;
}
var id = book.id;
var name = book.name;
jQuery("#sp1").text("id为"+id+"的图书 : "+name+"已经存在");
});
});
});