$("#toOK").click(function () {
var checkStatus = table.checkStatus('dataTable');
var datas = checkStatus.data;
var length = checkStatus.data.length;
if(length != 1){
layer.alert("请选择一行数据");
}else{
parent.$("#teacher_name").val(datas[0].name);
parent.$("#teacher_uid").val(datas[0].id);
var index=parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
});