首 页 教育新闻课件中心论文中心教学教案试题中心语文专题综合下载技术教程公务员  
设为首页
加入收藏
联系我们
您当前的位置:中国教育资源网 -> 技术教程 -> 网站建设 -> 源码精华 -> 技术内容 退出登录 用户管理

表单数据自动提醒源码精华教程

论文作者:佚名  论文来源:不详  论文发布时间:2006-6-20 2:37:43  论文发布人:chjchjchj

减小字体 增大字体

<SCRIPT LANGUAGE="JavaScript">
<!--
var Formname = 'form1';
function checkinput(Formid,Preg,Errormsg)
{

var val=document.all[Formname][Formid].value;
var rx = new RegExp(Preg);
var matches = rx.exec(val);
if (matches == null){
document.all[Formname][Formid].value='';
alert(Errormsg);
}
}

function checkempty(Formid,Preg,Errormsg)
{
if (
document.all[Formname].id.value!=''
document.all[Formname].id2.value!=''
document.all[Formname].pw.value!=''
document.all[Formname].em.value!=''
)
{
document.all[Formname].btSubmit.disabled = false;
}

}
//-->
</SCRIPT>
<FORM METHOD=POST ACTION="" name="form1">

ID :<input type="text" name="id" class="button" onchange="checkinput('id','^[a-zA-Z0-9_]{6,12}$','用户名 6-12位,其后只能含有字母、数字和下划线!')">
<BR>

ID2 :<input type="text" name="id2" class="button" onchange="checkinput('id2','^[a-zA-Z][a-zA-Z0-9_]+$','用户名首字符必须是字母,其后只能含有字母、数字和下划线!')">
<BR>

PW :<input type="text" name="pw" class="button" onchange="checkinput('pw','.{6,16}','只能为密码为6~12位!')">
<BR>

EM :<input type="text" name="em" class="button" onchange="checkinput('em','^[_a-z0-9]+@([_a-z0-9]+\.)+[a-z0-9]{2,3}$','请输入正确的邮箱地址!')"><BR>
<input type="text" validator="^(1920)[0-9]{2}$" errorInfo="不正确的年份!" >
<INPUT type="button" name="btcheck" value="检测表单" onclick="checkempty()">
<input type="submit" name="btSubmit" value="提交表单" disabled>
</FORM>

(出处:

[] [返回上一页] [打 印] [收 藏]  
 ∷相关技术评论  (评论内容只代表网友观点,与本站立场无关!) [查看发表评论...]
 
 中国教育资源网免费技术教程下载中心-站内广告 站内广告 中国教育资源网免费技术教程下载中心-站内广告 
 中国教育资源网站内搜索 站内搜索 中国教育资源网站内搜索 
 

   
 中国教育资源网免费技术教程下载中心-栏目导航 栏目导航 中国教育资源网免费技术教程下载中心-栏目导航 
· Dreamweaver · FrontPage
· CSSHTML · DOMJS
· Google排名 · 搜索研究
· 网络赚钱 · Alexa相关
· 建站交流 · 源码精华
· 经验技巧
 
中国教育资源网免费技术教程下载中心-相关教程  相关技术 中国教育资源网免费技术教程下载中心-相关教程
· 利用userData实现客
 中国教育资源网免费技术教程下载中心-本月热门教程 本月热门 中国教育资源网免费技术教程下载中心-本月热门教程 
 
 中国教育资源网免费技术教程下载中心-本日热门论文 本日热门 中国教育资源网免费技术教程下载中心-本日热门论文 
 
关于本站 - 网站帮助 - 免费课件 - 美容 - 绿色软件 - 软件下载 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 网站留言
浙ICP备06010405号 Email:cnkjz@163.com 技术支持:名流设计
版权所有 Copyright© 2002-2004 名流