Simple Web Development Code (Revision)

zhaozj2021-02-08  218

I. Page Design Sections 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 To specify an action if it is submitted to the specified action = "" Method: Perform irreversible action Using POST, reversible action Use GET OnSubmit: All FORMs must specify the check programs required 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 check through Form's onSubmit activation. 5.Title Attributes All pages must have the same Title as this page title. 6. The naming of the control uses the control type abbreviation (lowercase) English word (first letter capitalization) method. The control is basically involved in several types of Button: BTN Form: FRM SELECT: SEL TEXTAREA: TXT INPUT: IPT 7. Language Set All Chinese Pages: 8. The control attribute assigns all controls of all controls to include both quotation marks or single quotes. II. Client Program Section 1. Processing (2-1) All Error Information All Error Information All Error Information is used, and 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, punctuation uses Chinese half-width symbols, and the format is as follows: "Success:" prompt information "!" 3. Back to the page All needs to return to the previous one Use history.back (); do not use history.go (-1); need to return to the previous N page (N> 1) Use History.go (-N); all returns use the connection method instead of button . 4. Decision of the Submitted Data Guaranteed by the data before submission, the data type and the length of the data are numbed by the length of the data: use the function isnan () length judgment: the length should be judged to remove the actual length after the front and rear spaces: all not Allowing the empty input field to determine after the front and rear spaces, if the field must not be empty if the query condition is not empty, if the condition is discovered, the error message is prompted by (2-1), then pass the method FOCUS () Focus the error field. 5. Delete the prompt before the data All involved in the deletion, and then perform a confirmation operation after the user selection.

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. If you have any feelings, please tell me, I will fix this article. Thank you. Email: guiwang.com@163.com QQ: 393356

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

New Post(0)