Often write JS friends often because of the function of writing more, after a period of time will forget the purpose of the function, or the function of the parameters of the situation, this time will be associated with the powerful hint of the VS tool function, much hope can also be realized on js, tell you, this idea is not much difficult, VS2010 to help us solve this problem, below to see how the specific operation:
1 <Script>2 functionsayhi (name, Age) {3 ///<summary> Self Introduction to the function of name and age </summary>4 ///<param name= "name" type= "String" > name to introduce </param>5 ///<param name= "age" type= "int" > ages to introduce </param>6 varStr= "Hello everyone, my name is:" +name+ ", I this year" + age+ "years";7 Alert (str);8 }9 </Script>
Notice that the above code has summary, param English font, its summary is to record the function, param is the parameter in the method, name is the parameter name, type is the parameter of the types >< intermediate is the relevant description of the Parameter.
So that after a period of time, and then come back to use this code, we can get hints and understand the function through these records, not to go to the function of the code to see half a day.
below to see the effect of the hint, really very good.
In Vs.net 2010,2015 and other versions, add code hints \ comments to the JS function