Simple Web Development Specification (Revision) Sunsnow8 column

xiaoxiao2021-03-06  18

I. Page design part

1.IMG control

Alt: All display clauses must have text descriptions that can briefly describe the image content.

2.input control

MaxLength: All Input controls require a MaxLength property, the default value is the length of the corresponding field in the database.

Readonly: All non-changeable messages use the readonly property.

3.FORM control

Action: All forms must specify an action, if the submit is given to itself, specify an action = ""

Method: Execute irreversible action using POST, reversible action using Get

OnSubmit: All forms must specify the check programs needed before submission.

All forms must have corresponding RESET Button.

4.button control

OnClick: The Button for Submit in Form is not allowed to use this method, all data checks via Form's onSubmit activation.

5.TITLE attribute

All pages must have the same Title as this page title.

6. Naming of the control

Use control type abbreviation (lowercase) English word (first letter capitalization) method.

The control is basically involved in several categories.

Button: btn

Form: FRM

SELECT: SEL

Textarea: TXT

INPUT: IPT

7. Language settings

All Chinese pages should add the following statement:

8. Control property assignment

All controls of the attribute values ​​are used to include double quotes or single quotes.

Second. The client program part

1. Error prompt processing (2-1)

All error messages all use Chinese prompt error messages, the punctuation uses the Chinese half-horn symbol, the format is as follows:

"Error:" prompt information "!"

2. Successful reminder information (2-2)

All successful information All use Chinese prompt success information, the punctuation uses the Chinese half-width symbol, the format is as follows:

"Success:" prompt information "!"

3. Back to the page

All History.BACK () is used when needed to return to the previous page; do not use history.go (-1);

You need to return to the previous N page (n> 1) Use History.go (-N);

All returns use the connection method instead of button.

4. Judgment of the data before submitting

Guaranteed the data before submission, data type and length judgment through JavaScript

Is it a number: use function isnan ()

Length Judgment: The length should be judged to remove the actual length after the front and rear spaces

To empty judgment: All the input fields that do not allow the empty input field must be judged after the front and rear spaces, and if the field is the query condition, it must not be empty.

If the condition is discovered, the error message is prompted by (2-1), then the error field is focused by the method FOCUS ().

5. Delete the prompt before data

All operations involved in deletions are once a confirmation operation after the user is selected.

III. Server-side program section 1. Number of data passes through GET, POST, and the data passed through TRIM before and after use before use. 2. Determination of data is required to perform empty, type, and length again through the parameter data obtained by Request. 3. Close Objects All databases and file objects must be as early as possible, simultaneously assign Nothing. 4. Tips Information All Error Tips Use the JavaScript prompt to ensure that the user does not see any internal error message. (Such as 1-1) involves the operation of the database Update, DEL, and INSERT to be prompted. (, Such as 1-2) 5. Use all variables need to be declared before use, and 6. Named of variables Adopt variable type abbreviation (lowercase) English word (first letter capitalization) method. The development variables are basically involved in several categories: I decimal: f Character: S Boo: B Date: D Special: Cycle use I, J, M, N; array with ARY pointer P, Q temporary variable TMP seven.sql Statements 1. Sort Order should be used to use the field sort of the establishment index or primary key. 2. Sense Select SELECT Avoid usage *, even if all fields are needed, try to list the order in accordance with the usage. 3. Try to avoid using IN and NOT IN 8. Test all pages to run at 800 * 600, 1024 * 768 two resolutions. All pages are running in IE5.0, 5.5 and 6.0 through without JavaScript errors.

转载请注明原文地址:https://www.9cbs.com/read-53534.html

New Post(0)