function getAjaxReturn(success_function,fail_function)
{
var bol=false;
$.ajax({
type:"POST",
http://www.jb51.net/userexist.aspx",
data:"username=" vusername.value,
success:function(msg){
if(msg=="ok"){
showtipex(vusername.id,"
该用户名は使用可能です",false)
success_function(msg);
}
else
{
showtipex(vusername.id,"
该用户已被注册 ",false);
vusername.className="bigwrong";
fail_function(msg);
//return false;
}
}
}) ;
function success_function(info)
{
// やりたいことを実行します
alert(info);
functionfail_function(info)
{
// したいことをします do
alert(info)
}