1. The color of the error prompt text
http://v3.bootcss.com/css/#forms
jquery Tutorial:
Http://www.w3school.com.cn/jquery/index.asp
2. Project Address: Https://github.com/digitalClass/web_page
Site Address: http://115.28.30.25:8029/
3. Main work
Optimize Login Registration page display
Because of business needs, landing registration page was changed by the backend, showing the following results:
You can see that the form is all messed up. Open the backend given HTML file, completely messy
<form action= "." Method= "POST" accept-charset= "Utf-8" > {% if form.errors %} {% include "users/ partials/errors.html "%} {% endif%} {% Csrf_token%} {% for field in form%} <div class=" Form-group "t Extalign= "Left" > {% include "users/partials/field.html"%} </div> {% endfor%} < Button type= "Submit" class= "btn btn-primary" >Submit</button> </form>
And the field.html file is like this again.
{% load form_tags%}{% if Field.is_hidden%} {{field}}{% elif field|is_honeypot%} {% include ' users/partials /honeypot.html "%}{% Else%}<Divclass= "Field-wrapper {{Field|input_class}} {{field.css_classes}}{% if field|is_checkbox%} checkbox{% endif%}">{% if field.errors%}<labelclass= "Errorlist Control-label">{{field.errors|unordered_list}}</label><BR>{% endif%} {% if Field|is_checkbox%} {{field}} {% endif%}<label for= "{{Field.id_for_label}}"{% If field.field.required%} class= "Required"{% endif%}>{{Field.label}}{% if field.field.required%}<spanclass= "asterisk">*</span>{% endif%}</label>{% if not field|is_checkbox%} {{field}} {% endif%} {% if Field.help_text%} <Divclass= "Help_text">{{Field.help_text|safe}}</Div>{% endif%}</Div>{% endif%}
Completely do not understand good, but still want to change, no way to bite the bullet to change
However, this paragraph <li> can not find the corresponding good or bad ..... Change an egg!!!
Then there was no way to bite the bullet on JavaScript.
/**/$ (function( ) {var text1 = $ (". Errorlist li" ). First (). Text () $ (". Errorlist"). HTML (Text1); $ (". Errorlist"). CSS ("Color", "#3c763d")})
Dynamically modify the code, I have been their own wit to frighten ...
4. Final effect:
Front-end Development---login Registration page optimization