和即时通讯使用这样的值。名称,湾,pall,dest工作正常。但是长度输出为“undefined”。请大家帮我罚这个错误..感谢..
这是我的Ajax代码:
$(document).ready(function()
{
$("#bcode").focus();
//prevents autocomplete in some browsers
$("#bcode").attr('autocomplete', 'off').keyup(function(event)
{
var name = $("#bcode").val();
var bay = $("#select").val();
var pall = $("#select2").val();
var dest = $("#select4").val();
var length = $("#length").val();
$("#status").empty();
if(name.length > 17)
{
selectAll();
$("#status").html(' Checking availability...').show();
$.ajax({
type: "POST",
url: "namecheck.php",
data : "bcode=" + name + "&select=" + bay+ "&select2=" + pall+ "&select4=" + dest+ "&length=" + length,
success: function(msg)
{
$("#status").html(msg).show();
}
});
}
else
{
$("#status").html('').addClass('err').show();
}
});
});
2011-06-15
tharindu