To demonstrate JSON performance, let's look at a person object with a vehicle Object List and a person object with one or more vehicles. Each vehicle has the following attributes: Brand Registration Code CC browser UI brand name cannot contain numbers. A brand name can contain up to two words, with a space in the middle. The registration code must all be numbers.
All must be numbers. The minimum value is 50 and the maximum value is 5000. Three input fields correspond to the vehicle attributes. You can enter information in the fields. Next, you will see how to group authentication messages to the JSON group and how to access these authentication messages.
- Brief Introduction to the use of JSON Asynchronization
- Readers should describe the use and maintenance of JSON
- Describe how to return JSON data
- Details about mutual conversion of JSON-lib packages
- Detailed description of JSON conversion usage information set
Traditional Method
Now, when the vehicle data entered by the user is 40CC, the program must display a message indicating that the input data is not within the valid CC range. You can use the code in Listing 1 to simply display the message.
-
- if(cc < <%= minCC %> || cc > <%= maxCC %>) {
- alert(<%= ResourceList.vehicleCCRangeMsg >);
- }
JSON performance is a server class that contains international vehicle messages such as vehicleCCRangeMsg ). This solution is slightly confusing: In this method, you add the server code to all client verification functions to check the conditions and display messages. If you have changed the Organization Methods of metadata and messages, such as server-side classes or variables, you may feel a headache for changing the client script verification functions that use these metadata and messages.