<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<script type= "Text/javascript" >
/* var str= "Cheghao";
var reg=/./;
Alert (Reg.test (str));
var phone= "DFDF";
var reg=/\d/;
Alert (reg.test (phone));
var phone= "FDF";
var reg=/\d/;
Alert (reg.test (phone));
var phone= "FDF";
var reg=/\s/;
Alert (reg.test (phone));
*/
/*
var arr=[];
Arr[0]=1;
arr[1]=3;
Arr[2]= "a";
Arr[4]=true;
For (var index in arr) {
document.write (arr[index]+ "<br/>");
}
var arr=[];
Arr[0]=1;
arr[1]=3;
Arr[2]= "a";
Arr[4]=true;
for (Var str in arr) {
document.write (str+ "<br/>");
}*/
/* var d1=new Date ();
document.write (d1.tostring () + "<br/>");
var d2=new Date ("2010-10-01 11:01:36");
document.write (d2.tostring () + "<br/>");
var d3=new Date ("2010,10,11");
document.write (d3.tostring () + "<br/>");
*/
/* var d1=new Date ();
var year=s1.getfullyear ();
var month=d1.getmonth () +1;
var date=d1.getdate ();
var day=d1.getday ();
Switch (day) {
Case 0:
Day= "Sunday";
break;
Case 1:
Day= "Monday";
break;
Case 2:
Day= "Tuesday";
break;
Case 3:
Day= "Wednesday";
break;
Case 4:
Day= "Thursday";
break;
Case 5:
Day= "Friday";
break;
Case 6:
Day= "Saturday";
break;
}
document.write ("Today is:" +year+ "Year" +month + "month" +date+ "Day" +day);
*/
function Testconfirm () {
var answer=window.confirm ("Are you sure you want to exit?" ");
if (answer) {
Window.close ();
}else
{
Window.alert (":-)");
}
}
function Testprompt () {
var answer=window.prompt ("Please enter password:", "123");
alert (answer);
}
</script>
<body>
<input type= "button" value= "Testconfirm" onclick= "testconfirm ()" >
<input type= "button" value= "Testprompt" onclick= "Testprompt ()" >
</body>
Instead of the memory in the computer, it is better to take out to help a group of small white HTML five