web| Specification | Development Specification | Development Specification I. PAGE Design section
1.img Control
ALT: All display class pictures should have a text description that briefly describes the content of the picture.
2.Input Control
MaxLength: All input controls need to develop the MaxLength property, which defaults to the length of the corresponding field in the database.
ReadOnly: The ReadOnly attribute is used for all information that cannot be changed.
3.Form Control
Action: All form must specify action, if submitted to itself, specify action= ""
Method: Perform irreversible actions using post, reversible action using get
OnSubmit: All form must specify the check procedure required before submitting.
All form must have a corresponding reset button.
4.button Control
The button used for submission in Onclick:form does not allow this method to be used, and all data checks are activated through the onsubmit of the form.
5.title Properties
All pages should have the same title as this page.
6. Naming of controls
Use the control type abbreviation (lowercase) + English word (first letter uppercase) method.
The control in development basically involves several kinds of
Button:btn
Form:frm
Select:sel
Textarea:txt
Input:ipt
7. Language Settings
All Chinese pages should be added with the following statement:
<meta http-equiv= "Content-language" content= "ZH-CN" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
8. Control Property Assignment
property values for all controls are included with double quotes or single quotes.
Two. Client program part
1. Handling of error messages (2-1)
All error messages use the Chinese hint error message, punctuation is used in the Chinese half-width symbol, the format is as follows:
"Error:" + hint info + "! "
2. Information Processing of Success tips (2-2)
All successful information using Chinese prompts success information, punctuation using the Chinese half-width symbol, the format is as follows:
"Success:" + hint message + "! "
3. Return of the page
All need to return to the previous page using History.back (); Do not use History.go (-1);
Use History.go (-N) when you need to return the first n pages (n>1);
All returns use the connection method instead of the button.
4. Judgement of pre-submission data
Ensure data type and length are judged by JavaScript before submission
Is number: Use function isNaN ()
Length judgment: Length to determine the actual length of the space before and after removing
Null judgment: All input fields that are not allowed to be empty should be judged after removing the spaces, and must not be empty if the field is a query condition
If the judgment condition finds a data error, it prompts the error message by (2-1) and then focuses the error field through the method focus ().
5. Tips before deleting data
All operations that involve deletion will be confirmed again after the user has selected.
Three. Server-side Program section
1. Access to Data
By Get,post, the data that is passed through the connection is removed by the trim before and after the data is used.
2. The judgement of the data
The parameter data obtained through the request need to be judged again by the null, type, and length.
3. Close the object
All database and file objects should be close as soon as possible after use, with nothing.
4. Hint Information
All error messages use JavaScript prompts to ensure that the consumer does not see any internal error messages. (such as 1-1)
The operations involved in database Update,del,insert are prompted for success. (such as 1-2)
5. Use of variables
All variables need to be declared before they are used, and an initial value is assigned.
6. Name of variable
Use the variable type abbreviation (lowercase) + English word (first letter uppercase) method.
The variable in development basically involves several kinds
Integer: I
Decimal: F
Character: s
Boolean: b
Date: D
The Special:
The loop adopts i,j,m,n in turn;
Array with ary
Pointer p,q
TEMP variable tmp
Seven. SQL statements
1. Sorting
Order should be sorted as early as possible using the fields that establish the index or primary key.
2.select
Select to avoid the use of *, even if you need all the fields should try to list them in the order in which they are used.
3. Try to avoid using in and not in
Eight. Test
All pages must be run at 800*600,1024*768 two resolutions.
All pages will run through ie5.0,5.5 and 6.0 without JavaScript errors.