Login (& quot; login name cannot be blank & quot;); add html code to the front end. Why is the front end ineffective ?,

Source: Internet
Author: User

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 ");

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.