我对javascript是外行啊,请大家指点迷津!

解决方案 »

  1.   

    贴出完整的代码,包括html部分
      

  2.   

    你的代码中存在有非串中的全角空格。多出现与行首。ie5不能识辨前导的全角空格所以出错,而ie5.5和ie6把前导的全角空格视为半角的
      

  3.   

    在ie下载完页面的时候,状态栏提示完成但网页有错误!ie的状态栏”完成“左边是个惊叹号,
      

  4.   

    你的代码中用__标出的地方都是全角空。删掉即可
    function checkForm(){
    ____ 
    ____if (document.userInfo.email.value.indexOf('@')==-1){
    ____  alert ("The email address you entered does not contain the right characters!");
    document.userInfo.email.focus();
    ____  return  false ;
    }
    else if (document.userInfo.password.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.password.focus();
    ____  return false;
    }
    else if (document.userInfo.cpassword.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.cpassword.focus();
    ____  return false;
    }
    else if (document.userInfo.firstname.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.firstname.focus();
    ____  return false;
    }
    else if (document.userInfo.lastname.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.lastname.focus();
    ____  return false;
    }
    else if (document.userInfo.country.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.country.focus();
    ____  return false;
    }
    else if (document.userInfo.company.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.company.focus();
    ____  return false;
    }
    else if (document.userInfo.address1.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.address1.focus();
    ____  return false;
    }
    else if (document.userInfo.password.value != document.userInfo.cpassword.value){
    ____  alert ("Your Confirmation password does not match your original password!" );
    document.userInfo.cpassword.focus();
    ____  return false;
    }
    else return true;
    }
      

  5.   

    你的代码中用__标出的地方都是全角空。删掉即可
    function checkForm(){
    ____ 
    ____if (document.userInfo.email.value.indexOf('@')==-1){
    ____  alert ("The email address you entered does not contain the right characters!");
    document.userInfo.email.focus();
    ____  return  false ;
    }
    else if (document.userInfo.password.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.password.focus();
    ____  return false;
    }
    else if (document.userInfo.cpassword.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.cpassword.focus();
    ____  return false;
    }
    else if (document.userInfo.firstname.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.firstname.focus();
    ____  return false;
    }
    else if (document.userInfo.lastname.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.lastname.focus();
    ____  return false;
    }
    else if (document.userInfo.country.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.country.focus();
    ____  return false;
    }
    else if (document.userInfo.company.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.company.focus();
    ____  return false;
    }
    else if (document.userInfo.address1.value ==""){
    ____  alert ("One or more of the required fields is missing!" );
    document.userInfo.address1.focus();
    ____  return false;
    }
    else if (document.userInfo.password.value != document.userInfo.cpassword.value){
    ____  alert ("Your Confirmation password does not match your original password!" );
    document.userInfo.cpassword.focus();
    ____  return false;
    }
    else return true;
    }
      

  6.   

    搞定了,感谢!xuzuning(唠叨)!