国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

node.js - KOA-EJS interaction, frontend, data obtained by ajax, how to use EJS template to render.
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-06-24 09:43:10
0
1
1094


At the beginning of the backend, the data passed in was displayed normally. I don’t know how to display the data returned by ajax using an EJS template.

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證0級講師

reply all(1)
習(xí)慣沉默

ejs is used for the first rendering, ajax cannot be rendered with ejs

Give me the simplest example

<script>
    var test = '<%= val %>'
</script>

After writing this, after your ejs is rendered and you inspect the element, you will find that the ejs syntax val in the js has been rendered as a fixed value

ejs is not an mvvm framework. The purpose of using ejs is to bring some data and reduce requests during the first rendering.

Otherwise, the method is to load the data for the first time, request, load, and then render the data

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template