Instead of the memory in the computer, it is better to take out to help a group of small white HTML five

Source: Internet
Author: User
Tags fdf

<! 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.