Today's homework, the overall is still possible ...

Source: Internet
Author: User

varHr= "; varUrl= "http://www.baidu.com/about/news.php"; varIndex=url.indexof (". php");//gets the string. The subscript value of PHPdocument.write (url.substring (index));//outputs the end of the specified subscript string with the substring methoddocument.write (HR); varstr= "JavaScript"; varLen=str.length;//gets the length of the string             for(varI=len-1;i>=0;--i) {//backward traversal of output from the end of a stringdocument.write (Str.charat (i));//the output string corresponds to the underlying value} document.write (HR); vartoday=NewDate (); varDays=today.gettime ();//gets the current system time            varcomeday=NewDate ("1994-09-02");//Create Birth Time            varcomedays=Comeday.gettime (); varNow=days-comedays;//subtract the time of birth from the current time to get the median differenceNow=math.ceil (NOW/1000/3600/24);//milliseconds converted to days, and then Ceil method to take up the whole document.write ("Distance Birth date 1994-09-02 already:" +now+ "Days! ");            document.write (HR); //var username=window.prompt ("Please enter user name! ");            //var Panduan = function () {//Now the variable is a function            //var arr=["*", "%", "&", "<", ">", "!", "@", "#";            //var len=arr.length;//gets the length of the array            //var strlen=username.length;//gets the string length of the user input            //For (Var i=0;i<strlen;++i) {            //For (Var j=0;j<len;++j) {            //If (Arr[j]==username.charat (i)) {//Determines whether the characters in the array are the same as the characters entered by the user            //return 0;            //              }            //          }            //      }            //return 1;            // };            //If (Panduan (username)) {//Call Note if function parentheses            //alert ("The user name is legal! ");            //}else {            //alert ("The user name is illegal! ");            // }            vararr=[1,5,13,11,23,34,20]; vartrun=function(A, b) {returnA-b;            } document.write (Arr.sort (Trun));            document.write (HR); vartoday=NewDate (); //var year=today.getfullyear ();//Year 4 bit            //var moth=today.getmonth ();//month            //var data=today.getdate ();//Date            //var week=today.getday ();//0-6 weeks            //var hours=today.gethours ();//hour            //var miu=today.getminutes ();//Minutes            //var sec=today.getseconds ();//sec            //var secc=today.getmilliseconds ();//milliseconds            varTodays=today.tolocalestring ();//output Current system time Datedocument.write ("Today is:" +todays);            document.write (HR); varstr= "Guangzhou Chuan Zhi Education, is a professional training of educational institutions!" "; varre=/education/g;//Regular Expressions don't quite understanddocument.write (Str.replace (Re, ' education '));//Repace replacing a specified character

Today's homework, the overall is still possible ...

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.