بچه ها اسکریپت من چه مشکلی داره؟کمک کنید لطفا.کار نمیکنه
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input').focus(function(){
$('input') .removeclass('selectbtn');
$(this).addclass('selectbtn');
});
$('form').submit(function(event){
event.preventdefault();
var user= $('input#username').val();
var pass = $('input#pass').val();
if (!user)
{
alert('please enter username.');
$('input#username').focus();
}
else if(!pass)
{
alert('please enter your password.');
$('input#pass').focus();
}
else
{
$.post('http//localhost/www/mk/checkaccount.php', {username:user,passwordass},function(data){
if (data == '1')
{
$('#login').hide()
$('#welcome').block();
}
else if (data == '0')
alert('oops! You didnt enter correct username or pass,if you dont have account, please sign up now');
$('input#username').focus();
});
}
return false;
});
$("a.signup").click(function(){
$('#signup').show();
$('#login').hide();
});
$('signupform').submit(function(event){
event.preventdefault();
var name= $('input#fullname').val();
var tel = $('input#tel').val();
var email= $('input#email'). Val();
var city= $('input#usercity'). Val();
var job= $('input#job'). Val();
if (!name)
{
alert('please enter your fullname.');
$('input#fullname').focus();
}
else if(!tel)
{
alert('please enter your tel.');
$('input#tel').focus();
}
else if(!email)
{
alert('please enter your right email.');
$('input#email').focus();
}
else if(!city)
{
alert('please enter your city.');
$('input#usercity').focus();
}
else if(!job)
{
alert('please enter your job.');
$('input#job').focus();
}
else
{
$.post('http//localhost/www/mk/signup.php', {customername:name,usertel:tel,useremail:email,customercity:city,userjob:job},function(data){
if (data == '1')
{
alert('welcome dear user');
}
else if(data=='0')
alert('oops! Please try again');
$('input#username').focus();
});
}
});
});
</script>