var showMoreList = $$(".showMoreList"), searchInput = $('searchInput'), searchBtn = $('searchBtn'), closeMsgBoxBtn = $('closeMsgBox'); if(showMoreList.length > 0){ $powerFloat(showMoreList,{ offsets: { x: 0, y: 4 }, position: '3-2' }) } if($isEle(searchInput)){ $autoRemind(searchInput); searchInput.addEvent("keyup", function(e) { if (e.key === "enter") { this.blur() $("searchBtn").fireEvent("click"); } e.stop(); }); } if($isEle(searchBtn)){ searchBtn.addEvent('click', function(){ var ele = this; if($isEmpty(searchInput)){ testRemindBottom(searchInput, "请输入要查询的课程"); setTimeout('$testRemind.hide()',3000); }else{ new AjaxPost(ele, { url : '/CourseController/findCourse', data : { keyword : searchInput.val() } }).send(); } }); } if($isEle(closeMsgBoxBtn)){ closeMsgBoxBtn.addEvent('click', function(){ $('newMsgBox').dispose(); }); } var testRemindBottom = function(ele, msg){ if($isEle(ele)){ $powerFloat(ele, { eventType: null, targetMode: "remind", target: msg, zIndex: 201, position: "7-5" }); } }