﻿
/*
    去处空格
    */
    String.prototype.Trim = function()
    {
        return this.replace(/(^\s*)|(\s*$)/g, "");
    }
    

//提交时验证
function DoValidate()
{
    //用户名
    var strusername = document.getElementById("txtUserName").value.Trim();
    if(strusername=="" || strusername ==null)
    {
         alert('请输入用户名！');
         return false;
    }
    
    //注册邮箱
    var txtemail = document.getElementById("txtemail").value.Trim();
    if(txtemail=="" || txtemail ==null)
    {
        alert('请输入注册邮箱！');
        return false;
    }
  
    return true;
}
