< H2 > for example, if I send a video result in here, I want to call the backend interface through the ajax method again to generate its thumbnail. How can I pass video as a parameter to the pug template used by ajax,? thank you < / H2 >
< H2 > for example, if I send a video result in here, I want to call the backend interface through the ajax method again to generate its thumbnail. How can I pass video as a parameter to the pug template used by ajax,? thank you < / H2 >
ajax seems to be that you can only transfer json data. In the past, there were xml, but now they all use json. Take a look at how to convert video to json object first, and then use ajax to transfer
//node
res.json(video);
//ajax
$.post('/api',{},function(video){
console.log(video);
});
. Previous: Ask how to configure webpack in a project built by lavas
Next: Execution order of js operation DOM and other JS code in browser