//子子程序抛出各种异常 function isEmail( stremail ) { if( stremail == null || stremail == "" ) throw( new Error( "Please Enter the E-mail!" ) ) ;
if( stremail.length > 100 ) throw( new Error( "E-mail is too long!" ) );
var regu ="^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$"; var re = new RegExp(regu); if( stremail.search(re) == -1 ) throw( new Error( "Is not validate E-mail address!" ) ); else return }