It must be simultaneously appeared simultaneously with its shutdown tag. Such as
... ... .... font> .... p> .... body>
* No cross-included statements, such as:
... .. p> font>
1.3 The attribute assignment specification of the tag is a tag that accepts the attribute. The attribute value must be surrounded by double quotation or single quotation. Such as:
1.4 Tagged Indentation Specification * The highest level of parent label is written in the left side of the top. * The next level marker is written in a TAB in a TAB in the next level, and the next level is pushed, and the left alignment is written to the parent labeling right. * The first character of the same level must be aligned. . 2. Client JavaScript Specification 2.1 Variable Naming Specifications * Constants and Global Variable Names must all use uppercase letters * Variable name first letters must be lowercase. * Variable Name must start using its type of writer. Various types of written strings are as follows: * Integer variable: int * long integer variable: LNG * floating point variable: flt * Double precision variable: DBL * Object reference variable: OBJ * string variable: str * Date Type variable: DTM * Variable name must be named after meaningful words, such as: strusername, LNGARRAYINDEX * Variable name except for the first letter, other words first characters must be capitalized * If the variable name can use words abbreviation, except for extensive understanding In addition to the word abbreviation, all variable names written in words must be given when defined, such as: var stradname // is used to represent the name of the Administrator account.
Var stradminName // Don't give an comment, Admin is widely understood
2.2 Variable Use Specification * You must be defined before the variable is used. Unswormless use of * variables are prohibited to use * variables as miniature to small scopes. Such as recycling
FOR (var i = 0; i <12; i ) {}
Instead:
Var i;
For (i = 0; i <12, i ) {}
2.3 Object Naming Specifications Various Page Objects such as Text Enter Boxes, Buttons, Drake Select boxes must be used when named: * Text input box: txt * button: btn * select drop-down selection box: SEL * OPTION Item: OPT * Form * frame frame: FRA * HIDDEN table: HDN * DIV tag: div * span tag: span * dialog object: DLG * Window object: Win 2.4 function and sub-process naming specification * Function naming must use verbs Noun pair, and can reflect function of function * Function named verb prefix must be the full verb * function related to the function function, named the first letter of the first letter, the first letters of each word, the third chapter Dynamic file coding specification 1. HTML writing specification HTML writing specification must comply with static file HTML tag book writing specification, reference (Chapter 2) 2. Client script The dynamic file client script will use JavaScript writing, and must comply with static Document Coding Specification for JavaScript coding specifications (Reference Chapter 2 2) 3. Server-side script writing specification server-side scripts Writing 3.1 Naming specification 3.1.1 VBScript scripting variable naming specification * constant and global variable must All Using uppercase letters * constant must use const_ prefix * Global variables must use G_ prefix * Variable name first letters must be lowercase. * Variable Name must start using its type of writer. Various types of written strings are as follows: * Integer variable: int * long integer variable: LNG * floating point variable: flt * Double precision variable: DBL * Object reference variable: OBJ * string variable: str * Date Type variable: DTM * Variable name must be named after meaningful words, such as: strusername, LNGARRAYINDEX * Variable name except for the first letter, other words first characters must be capitalized * If the variable name can use words abbreviation, except for extensive understanding In addition to the word abbreviation, all variable names written by words must be given when defined, such as: DIM stradname 'is used to represent the name of the Administrator account, DIM stradminname' does not have to give a comment, and Admin is a widely understood 3.1.2 object name. Specifications Various objects such as Connection, RecordSet, command must use the following corresponding prefix when named: * Conn * RecordSet object: RS * Command object: cmd * parameter object: param * Field object: FLD * Error object: Err 3.1 .3 function and child process naming specification * Function Naming must use verbs noun pairs, and enable functionality of function * Function named verb prefix must be the full verb * function related to function functions * function named first word Letters uppercase, back every word of each word 3.1.4 Common variable naming specification: Description: The part contained in [> is the omission part * Connection object: conn [name ". Name is a server name for the connected database * Recordset variable naming specification: RS [Name>. Name is English word combination related to customized with RS storage * Command objects: CMD [Name>.
Name is a custom-related word combination related to Command purposes * SQL statement string variable: strsql [commandname ". CommandName is a custom-related word combination with SQL statement features, such as: StrsqlupdateModify StrsqlinsertUser 3.2 code writing specification 3.2.1 Variables clearly declare principles * All ASP program files must contain <% Option Explicit% in the first line of code . Transfer to variables clearly declared mode 3.2.2 Character set setting principles * All ASP program files that will generate Chinese output to the client, must set Charset as "GB2312" prior to output. Such as: response.charset = "GB2312" 3.2 .3 function usage principles * Try to use the function package code block * Continuous code blocks should not exceed 50 lines. Do not exceed 70 lines * Try to use local variables. * If there is a global resource, such as Connection, try to incorporate the parameters of the function * All created in the function, you must turn it off before exiting the function. Such as: RecordSet, Command 3.2.4 Request, Session, Application Specification * All needs to be placed in session, Application objects, must use meaningful English name. In addition to the extensive word abbreviation, words should not be used. Such as: session ("cp") = strcurrentUserip 'is not allowed
Session ("currentuserip") = strcurrentUserip
Session ("PWD") = strpwd 'Allow, PWD is widely understood as password
* All Elements that need to be used in the code, session, Application elements must be assigned to the variable declared within the code in the code header. * If you get the content submitted in Form, you must use Request.form ("ItemName"). * If you get the content submitted in querystring, you must use the request.QueryString ("itemname") * must not appear in the code ("") Such a reference 3.2.5 HTML with server-side script hybrid usage * Server-side script tag "<%" must be left aligned with the mark next to the mark, such as:
<%
Do While Not Rs.eof
%>
TEXT TD>
TR>
<%
rs.movenext
loop
%>
TABLE>
* Server-side script tag "<%" Do not write * "%>" with its previous code, do not write * server-side script tag "%>" with its nearest " "Mark alignment * The HTML code inside the server side is written in accordance with the HTML indentation rules of the static file, and does not follow the server-side script indent rule * HTML tag internal code, according to the indentation rules of the server-side script, do not follow the HTML code indent Rules Chapter 4 Common Errors 1. ADO's Transaction 1.1 Error Code: 80004005. 1.1.1 Error Description: Microsoft OLE DB Provider for odbc drivers Error '' '' '' '' 80004005 '' '' '' 'Can't start the transaction in Firehose mode 1.1.2 Solution: In the start of ADO At the time, you must first turn off the record set opened by the same connection object, or set the cursor set position type as aduseclient. (Use the Client Tour Set) Chapter 5 Code Habit Writing Example 1. ADO object Use the 1.1 AdoDb.Connection object 1.3 adoDb.Command object 1.3 adoDb.recordset object 1.3.1 Create: SET RS = Server.createObject ("AdoDb.Recordset")
rs.cursorlocation = aduseclient
Rs.Open Strsql, CONN, 1 [, 1> "must specify the cursor type
转载请注明原文地址:https://www.9cbs.com/read-35539.html