页面中有一表单myform,表单中有名为txtEmail的输入电子邮件文本框,则以下验证电子邮件格式必须包含点符号(.)代码正确的是( ).(选择 一项)(选择一项)


var strEmail = document.myform.txtEmail.value; if(strEmail.indexOf(.,0)==-1){ alert(电子邮件格式不正确\n必须包含点符号! document.myform.txtEmail.focus( ); }

var strEmail = document.myform.txtEmail.text; if(strEmail.indexOf(.,0)==-1){ alert(电子邮件格式不正确\n必须包含点符号! document.myform.txtEmail.focus( ); }

var strEmail = document.myform.txtEmail.value; if(strEmail.concat(.,0)==-1){ alert(电子邮件格式不正确\n必须包含点符号! document.myform.txtEmail.focus( ); }

var strEmail = document.myform.txtEmail.text; if(strEmail.concat(.,0)==-1){ alert(电子邮件格式不正确\n必须包含点符号! document.myform.txtEmail.focus( ); }


点击这里跳转到答案查看网获取答案