You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).off('click',searchmsg).on('click','.search-button',searchmsg);
|
|
|
|
$(document).off('keydown',searchmsg).on('keydown','.search-input',KDsearchmsg);
|
|
|
|
$(document).off('click',select_one).on('click','.select-it',select_one);
|
|
|
|
})
|
|
|
|
function searchmsg(e) {
|
|
|
|
if($('.search-input').val()=='')
|
|
|
|
{
|
|
|
|
e.preventDefault();
|
|
|
|
alert('请输入学号');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
var id=$('.search-input').val();
|
|
|
|
var rqDate={"id":id};
|
|
|
|
var Url1='result_list.jsp';
|
|
|
|
$('.list-frame').load(Url1,rqDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function KDsearchmsg(e) {
|
|
|
|
if(e.keyCode==13)
|
|
|
|
{
|
|
|
|
searchmsg(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function select_one() {
|
|
|
|
var id=$(this).val();
|
|
|
|
var button=$(this);
|
|
|
|
var selectDate={"id":id};
|
|
|
|
var Url2='testfrom.jsp';
|
|
|
|
$.post(Url2,selectDate,function (data,status) {
|
|
|
|
if(status=='success')
|
|
|
|
{
|
|
|
|
button.css('background-color','rgba(88, 137, 238, 0.97)')
|
|
|
|
.html("已选")
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|