?? 11-17.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<script language="javascript" >
function isNumber(item,message){
var str = "1234567890";
var value = item.value;
var f=true;
// value=value.toString();
if(value.length==0){
alert(message);
item.focus();
f=false;
}
for(i=0;(i<value.length )&& (f==true);i++){
if(str.indexOf(value.charAt(i))==-1){
alert(message);
item.focus();
f=false;
}
}
return f;
}
function checkmail(item){
var str = item.value;
if((str.indexOf('@')!=-1)&&(str.indexOf('.')!=-1)){
return true;
}else{
alert("email不正確");
item.focus();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" action="index.html" onSubmit="return(checkmail(window.document.form.email,'長度不得為零必須是數字'))">
姓名:<input type="text" name="name"><br>
年齡:<input type="text" name="age"><br>
性別:<input type="radio" name="sex">男
<input type="radio" name="sex">女<br>
email:<input type="text" name="email"><br>
<input type="submit"><input type="reset">
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -