$ ("#codeId"). AddClass ("error");
$ ("#codeId"). HTML ("Login name cannot be empty");
To determine if the check-in name is empty, the message "Login cannot be blank" is the reason why the effect does not appear:
1. Determine that jquery has been introduced and effective
2. Confirm that the selected ID is correct
3, $ ("#codeId"). HTML ("Login name cannot be empty");
4. Ensure that the "hidden" attribute is removed, these $ ("#nameId"). AddClass ("Error"), $ ("#nameId"). HTML ("Login cannot be empty"); "Color:white" priority is greater than $ ("# NameId "). AddClass (" error "), high so to remove the" Color:white "of $ (" #nameId "). AddClass (" error "), the effect will come out.
JSP page code:
Style $ ("#nameId") to be added through jquery. addclass ("error");
Use $ ("#codeId"). AddClass ("error"); $ ("#codeId"). HTML ("Login cannot be empty"); Add HTML code to the front end effect not coming out?