搜索教师文本框
This commit is contained in:
1 parent
43d4ecdfaf
commit
5ec62936ed
2 files changed
+44
-12
No files matched your search
@@ -3,7 +3,7 @@
|
||||
<style type="text/css">
|
||||
.srcSelectStyly{
|
||||
height:50px;
|
||||
margin-top:3px;
|
||||
/*margin-top:20px;*/
|
||||
border-style:solid;
|
||||
border-width: 1px;
|
||||
border-color:#e2e2e2;
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
.srcSelectStyly dd{
|
||||
margin-bottom: 3px;
|
||||
/*background-color:#f2f2f2;*/
|
||||
background-color:#f2f2f2;
|
||||
height: 30px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
@@ -170,11 +170,14 @@
|
||||
|
||||
// 监听SELECT
|
||||
$('#cySearch').bind({
|
||||
focus:function(){
|
||||
cjgl.selectOnfocus(this);
|
||||
},
|
||||
keyup:function(){
|
||||
// console.log('按键');
|
||||
// $('#aaa').remove();
|
||||
var val = $.trim($(this).val());
|
||||
if(val.length>0){
|
||||
cjgl.selectOnfocus(this,val);
|
||||
}else{
|
||||
// cjgl.selectOnblur('cySearch');
|
||||
}
|
||||
},
|
||||
blur:function(){
|
||||
// cjgl.selectOnblur(this);
|
||||
|
||||
@@ -163,12 +163,41 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它
|
||||
});
|
||||
},
|
||||
// Select获取焦点
|
||||
selectOnfocus:function(myobj){
|
||||
// console.log('获取焦点');
|
||||
// 声明变量
|
||||
var srcInput = $(myobj)
|
||||
,selectID = $(myobj).attr('id');
|
||||
srcInput.after('<div class="srcSelectStyly"><dl><dd onclick="cjgl.ab('+selectID+')">请选择</dd></dl></div>');
|
||||
selectOnfocus:function(myobj,val){
|
||||
|
||||
// 声明变量
|
||||
var srcInput = $(myobj);
|
||||
// 删除原来列表
|
||||
srcInput.next().remove();
|
||||
|
||||
|
||||
|
||||
srcInput.after('<div class="srcSelectStyly"><dl><dd onclick="cjgl.ab()">请选择</dd></dl></div>');
|
||||
|
||||
|
||||
// console.log(src);
|
||||
// 获取数据
|
||||
// $.post(
|
||||
// "{:Url::build('renshi/index/srcTeacher')}",
|
||||
// {
|
||||
// "str":val,
|
||||
// },
|
||||
// function(data,status){
|
||||
|
||||
// if($.isEmptyObject(data))
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// for (var i = data.length - 1; i >= 0; i--) {
|
||||
// var myhtml = "";
|
||||
// myhtml = "<input class='btn btn-secondary radius mr-5 size-MINI' type='button' value='" + data[i]['xingming'] + "' onclick=addCy(this,"+data[i]['id']+") title="+data[i]['js_danwei']['jiancheng']+' '+data[i]['sex']+' '+data[i]['age']+" >";
|
||||
// $('#cySelect').append(myhtml);
|
||||
// }
|
||||
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
},
|
||||
// Select失去焦点
|
||||
selectOnblur:function(selectID){
|
||||
|
||||
Reference in new issue
Block a user