问题描述
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>无标题文档</title></head><scriptlanguage="javascript">functiontest(){varp=/^[w]+.?+[w]+@[1]+[163,qq]+.+[com,org,net]$/;if(p.exec(document.form1.textfield.value)){alert("成功");}}</script><body><formid="form1"name="form1"method="post"action=""onsubmit="test()"><label><inputtype="text"name="textfield"/><br/></label><label><inputtype="submit"name="Submit"value="提交"/></label></form></body></html>
时间: 2024-09-30 20:30:02