Use $ ("# codeId "). addClass ("error"); $ ("# codeId" ).html ("login name cannot be blank"); add html code to the front end. Why is the front end ineffective ?,
$ ("# CodeId"). addClass ("error ");
$ ("# CodeId" Login .html ("login name cannot be blank ");
When the verification login name is null, the message Red "login name cannot be blank" is displayed:
1. Confirm that jquery has been introduced and becomes effective.
2. confirm that the selected id is correct.
3. $ ("# codeId" Login .html ("login name cannot be blank ");
4. Make sure that the "hidden" attribute is removed. These $ ("# nameId "). addClass ("error"); $ ("# nameId" ).html ("login name cannot be blank"); the operation can be displayed; "COLOR: white "Priority Ratio $ (" # nameId "). addClass ("error"); therefore, remove the $ ("# nameId") of "COLOR: white "). addClass ("error.
Jsp page code:
The style to be added through jquery $ ("# nameId"). addClass ("error ");