node.js - Want to use node module querystring in .ejs file
仅有的幸福
仅有的幸福 2017-05-16 13:38:07
0
1
640

Want to use the node module querystring

in the .ejs file

As the title says, how to use the querystring module in the contact.ejs file

Test Results

仅有的幸福
仅有的幸福

reply all(1)
洪涛

console.log The reason why there is no response is because you are generating code and running it in HTML. JavaScript running in ejs must be wrapped.

I don’t know if you want to run it in ejs or the generated HTML.

If it is ejs:

<% var querystring = require('querystring'); %>
<%= querystring('...') %>

If it is HTML, use it the same way you usually write JavaScript. Either put it on the server and import it through a link or package it into a bundle and import it.

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