Rooms blacklist management

Development tools and key technologies: VS backend

Author: Chen Chi Fan                                                                           

Write time: 2019.6.3

1. First, a pop-up box to set, and then set the head frame mode of the last frame body set mode, reset form. At the same time a label to each input class name, class-based selectivity with respect to performance-based selector id potentially expensive, since it requires to traverse all DOM elements. : Checked radio button or check box is selected. Controller needs to extract data to be modified, and then extracts the data according to the master key ID, followed by the entity to assign, modify final performance, and determine whether the data or data other blunt abnormal data and the like.

 2. We need to understand the need to verify the document number, besides the value entered impossible words, letters or little letter appears and so on, mostly 0-9, verify identification numbers to determine the regular expression: onkeyup = " value = value.replace ( / [^ 0-9] / G , '' ) " . To meet part of the string is given regular expression, and some regular expression processing tools as well as an option to deal with multiple rows. If this option is selected, ^ and $ meaning becomes at the beginning and end of the match line .

3. For the new data can be reset form, backfilling data, according json object fill form form also necessary to acquire the page data, then the data is determined, finally submitted asynchronous data, refresh Table . Of course, for data backfill, BlackSex need sex judge, checked comes with a check meaning. IF (data.BlackSex == " M" ) {

 

                     $("#UsGuestSexMale").attr('checked', true);

                     $("#UsGuestSexFemale").attr('checked', false);

                 } else {

                     $("#UsGuestSexFemale").attr('checked', true);

                     $("#UsGuestSexMale").attr('checked', false);

                 }

.attr () method is an operation attribute node, .prop () is an operation method corresponding to the acquired object property js. In the face to get or set checked, selected, readonly and disabled attributes, clearly better with prop method. .prop () method is more efficient because .attr () method to access the DOM.

4.jQuery is a js library, the main function is to provide the selectors, properties, and events to modify binding, and so on.

In remote loading method generally load HTML code inserted into the DOM, and when used, is typically used to obtain static data files from the Web server. To pass arguments, can $ .get () or $ .post () method.

Asynchronous: event-triggered request → server processing (which is the browser can still be used for other things) → processed.

The effect achieved is as follows:

When you click the radio button, will switch gender, as well as document number verification, input values, words and letters can not be entered, can only enter numbers.

Conclusion: The main point is the knowledge Rooms blacklist management changes, set the pop-up box, the data backfill, radio buttons, identification numbers verified, submit asynchronous data, perform the modification.

Guess you like

Origin blog.csdn.net/qq_44554890/article/details/90895931