Killing Thunder Dog---node. js---22 project construction in Node+express+mongo Blog Project 7 data modification

Source: Internet
Author: User

At the time of modification and in PHP, the same as the change, it is necessary to pass the list page ID to be able to implement the modification, as follows:

It then reads all the information about the ID at the same time as the backend receives his pass-through ID:

Then we begin to write the post processing data problem, as follows:

<%include header.html%><Divclass= "wrapper Row-offcanvas row-offcanvas-left">    <!--Left side column contains the logo and sidebar -    <%include Left. html%>    <!--Right side column. Contains the NavBar and content of the page -    <asideclass= "Right-side">        <!--Content Header (Page header) -        < Sectionclass= "Content-header">            <H1>category Edit<Small>Classification</Small>            </H1>            <olclass= "breadcrumb">                <Li><ahref= "Index.html"><Iclass= "fa Fa-dashboard"></I>Management Center</a></Li>                <Liclass= "category_list.html"><ahref= "Index.html">Classification</a></Li>                <Liclass= "Active">Category Edit</Li>            </ol>        </ Section>        <!--Main Content -        < Sectionclass= "Content">            <Divclass= "Row">                <Divclass= "Col-md-12">                    <Divclass= "box">                        <formAction= "/admin/category/edit"Method= "POST">                            <Divclass= "Box-header">                                <H3class= "Box-title"></H3>                                <ahref= "/admin/category/"class= "btn btn-default pull-right">Category List</a>                            </Div><!--/.box-header -                            <Divclass= "Box-body">                                <Divclass= "Form-group">                                    <label for= "InputTitle">Category headings</label>                                    <inputtype= "title"placeholder= "title"ID= "InputTitle"name= "title"value= "<%= data.title%>"class= "Form-control">                                </Div>                                <Divclass= "Form-group">                                    <label for= "Inputordernumber">Sort</label>                                    <inputtype= "title"placeholder= "Sort"ID= "Inputordernumber"name= "Sort"value= "<%= data.sort%>"class= "Form-control">                                </Div>                                <inputtype= "hidden"name= "id"value= "<%= data._id%>">                            </Div><!--/.box-body -                            <Divclass= "Box-footer clearfix">                                <Buttonclass= "Btn btn-primary"type= "Submit">Submit</Button>                            </Div><!--/.box-footer -                        </form>                    </Div><!--/.box -                </Div><!--/.col -            </Div><!--/.row -        </ Section><!--/.content -        <%include footer.html%>

And the modification is also by two can be completed, here in fact, and PHP is the same, the first to receive the ID, and then the edit page to traverse the ID data, and then is modified,

Kill lui lei Dog---node. js---22 project construction in Node+express+mongo Blog Item 7 data modification

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.