我已经开发了以下代码来检查单击搜索按钮时 Studentid 的可用性,但无法进行验证,请在这方面提供帮助我有以下代码:
$("#stud1search").click(function(e) {
var id = $('#studentidd').val();
if(id!="")
{
jQuery.ajax({
type: "GET",
url: '../jsp/admin/master/Studentinfo.jsp?stdid='+id,
async: false,
cache: false,
success: function(msg) {
if($.trim(msg)==1)
{
$('#searchkaro').html("Student Id: Student Id already exist");
}
else
{
$("#studentmother").html(msg);
$("#searchkaro").load("../jsp/admin/master/Studentinfo.jsp");
//$("#searchkaro").val("");
}}
}); }
else
{
$('#searchkaro').html("Enter Student Id");
}
});