Home > front end >  Front end using ajax to obtain the back-end data and apply colours to a drawing how to get to the pa
Front end using ajax to obtain the back-end data and apply colours to a drawing how to get to the pa

Time:09-17

Front end using ajax to obtain the back-end data and apply colours to a drawing how to get to the page?

CodePudding user response:

It is ok to have a look at ajax based, backend API defines a url, as long as ajax visit this address can access to the data, in response to display the data returned to the page, and API first discuss the way of data format and request information

CodePudding user response:

reference 1/f, three dozen soy sauce response:
it is ok to have a look at ajax based, backend API defines a url, as long as the ajax visit this address can access to the data, in response to display the data returned to the page, and API first discuss the way of data format and request information

Well, I went to look at, thank you

CodePudding user response:

The jquery API can be found in the way of using jquery

CodePudding user response:

reference rookie self accomplishment reply: 3/f
jquery API using jquery way can be found in the

Well, has been solved, now have layui something again, you have to know? ill

CodePudding user response:

$. Ajax ({
Type: "POST",
Url: the url,
Data: data,
Datatype: 'json,
Success: the function (res) {//res background data returned by the
//layer plug-in - tip
Layer. MSG (res. MSG);
}
}
});

CodePudding user response:

reference 5 floor Zheng Xiaomu reply:
$. Ajax ({
Type: "POST",
Url: the url,
Data: data,
Datatype: 'json,
Success: the function (res) {//res background data returned by the
//layer plug-in - tip
Layer. MSG (res. MSG);
}
}
});

Get rid of this, but is used only when rendering stitching way?

CodePudding user response:

Data received, generally has the following train of thought to render:
1. You said yes, joining together just a matter of, mostly through jQuery append, after these methods spell up
2. Insert the style, designing the good content of the class in advance, for the element to add class class can
3. The use of native js the createElement method, such as the appendChild method
4. Using the framework, such as presents, Vue, the Bootstrap js, such as the Table has already written the basic content of the UI, specify the data source (usually a JSON) can directly see rendering, other similar with Echarts Highcharts also can specify the data source, to see what kind of rendering you need

CodePudding user response:

refer to 7th floor Desatiny response:
data received, can have the following train of thought to render roughly:
1. You said yes, joining together just a matter of, mostly through jQuery append, after these methods spell up
2. Insert the style, designing the good content of the class in advance, for the element to add class class can
3. The use of native js the createElement method, such as the appendChild method
4. Using the framework, such as presents, Vue, the Bootstrap js, such as the Table has already written the basic content of the UI, specify the data source (usually a JSON) can directly see the rendering and other similar with Echarts Highcharts also can specify the data source, see you need what kind of rendering



Well, I am using layui framework, temporarily can only find a splicing rendering method, I mainly want to look at and it has other rendering method can be used to layui!

CodePudding user response:

First ajax asynchronous to the back-end, back-end data response back, and then use the success function for data processing, can render interface in success

CodePudding user response:

Backend returns a json string, you can alert page now or in the browser console print it out, then according to your need to intercept data out to the page

CodePudding user response:

references 9 floor?????? Response:
first ajax asynchronous to the back-end, back-end data response back, and then use the success function for data processing, can render interface in success

How can the success function in the data it receives in another HTML page display?
  •  Tags:  
  • Ajax
  • Related