Hello,world! <br/> <div style= "background:pink;width:300px;height:400px;" > <from action= "" method= "" Id= "Form1" > <p> <label for= "Beforenum" > enter the number you want to format:</br> <input name= "Beforenum" type= "text" id= "Beforenum" ></input> </label> </p> <p> <label for= "Numlength" > Please enter the length of the number to be formatted:</br> <input name= "numlength" type= "text" id= "Numlength" ></input> </label> </p> <p> <label for= "Afternum" > Formatted digital:</br> <input name= "Afternum" type= "text" id= "Afternum" ></input> < ;/label> </p> <input name= "Submit" type= "button" class= "" onclick= "Formatno (DOCUMENT.GETELEMENTB Yid (' Beforenum '). Value,document.getelementbyid (' Numlength '). "value=" Convert "/> <input name=" Cancel "type= "Button" class= "value=" Cancel "/> </form> </div> <script language=" JavaScript ">//Output Variable Type varTypea=3; vartypeb= "Name"; varTypec=NULL; Objecta=NewObject (); Document.writeln ("The type of <pre>a is" + (typeofTYPEA) + "\NB type is" + (typeofTYPEB) + "\nobject1 type is" + (typeofOBJECTA) + "</pre>"); //Conditional Operators varA=20; varB=20; Document.writeln (A!=B)?true:false; Document.writeln ("<pre> I like to learn JavaScript!!! \ n "); //new operatorobject1=NewObject (); Array2=NewArray (); Date3=NewDate ("May 21 2015") Document.writeln (Date3.getfullyear ()+ "</pre>");//If it is month, you must add 1 because the month is 0. //uppercase and lowercase conversions varmystring=NewString ("xinqing wil be happy!"); varLower=mystring.tolowercase (); varUpper=mystring.touppercase (); Document.writeln ("MyString converted to uppercase letters is" +Upper); //format a number to a specified length //call a function when you press the Convert button, with the parameter call functionFormatno (str1,len1) {if(len1== "" | | str1== "") {alert ("Please enter number and length"); } alert ("Length" +len1+ "; character" +str1+ ";"); varstrlen=str1.length; Alert ("Length" +len1+ "; character" +strlen+ ";"); for(i=0;i<len1-strlen;i++) {str1= "0" +str1; } varAfternum1=document.getelementbyid ("Afternum") //alert (str1);Afternum1.value=str1; } </script> </body>Variable operations, parametric functions,