Save and display Basic Information

Source: Internet
Author: User

Save and display Basic Information

The information entered on the page is generally associated with the backend server. Because the input information needs to be saved, the information needs to be obtained from the server during browsing.

The validation conditions of the confirm button will not be discussed anymore. The following is a direct attachment to the Code in the confirm where all information is entered in the correct else format.

Save information:

$. Ajax ({url: config. baseServerUrl + '/account/customer/houseInfo/save', type: 'post', data: {// The parameter houseStatus: $ conditionSlt submitted to the server (interface. val (), housePay: $ ("# housePay "). val (), customerId: customerId, pro: $ provinceSlt. text (), city: $ citySlt. text (), county: $ areaSlt. text (), addrDetial: $ ("# detail "). val ()}, success: function (data) {// The returned message console. log (data); if (data. success) {alert ("saved successfully! "); Window. location. href =" http: // 192.168.220.55/page/AmountAscension/basicInfo/basicInfo.html ";}else {return false ;}}})
Display Information:

Var customerId = sessionStorage. customerId; // the user ID can be used at any time. $ (function () {$. ajax ({url: config. baseServerUrl + '/account/customer/info', type: 'get', data: {customerId: customerId}, // The parameter success: function (data) {console. log (data); // print the data if (data. success) {// work information var work = data. attr. workInfo; // obtain and assign values to the data to display var workHtml = ''+'

'+ Work. job + ''+ work. organization +'

'+'

'+ Work. areaNo + ''+ work. phoneNo +'' + work. branchNo + ''+'

'+ Work. pro + ''+ work. city +'' + work. county +'

'+ ''+ Work. workDepartment +'' + work. position +'

'+'

'+ Work. industry + ''+ work. performanisescale +'' + work. classes +'

'; $ ("# WorkInfo"). append (workHtml); // Housing Information var house = data. attr. houseInfo; var houseHtml =' +'

'+ House. houseStatus + ''+ house. housePay +'

'+'

'+ House. pro + ''+ house. city +'' + house. county + ''+ house. addrDetial +'

'; $ ("# HouseInfo"). append (houseHtml );}}})})



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.