【发布时间】:2016-07-22 03:35:55
【问题描述】:
Ejs
<h4 style="display: inline">You are Connected to:</h4>
<u style="display: inline"><%= host %>:<%= port%> </u>
</br> </br>
<h4 style="display: inline">Output is:</h4>
<u style="display: inline"><%= temp %> </u> </br>
</section> </br>
<label> Click on graph for live updated graph! </label>
</br></br>
<button type="submit" formaction="/" formmethod="get" style="width: 8em;">Clear</button>
</br> </br>
节点js
app.post('/output3', function(req, res){
client.once('message', function (message) {
var temp = message.toString(); //here you assign temp variable with needed value
res.render( 'index', {temp:temp, host: HOST, port: PORT})
});
});
app.get('/', function(req, res){
res.sendFile(__dirname + '/upload2.html')
});
当我按下清除按钮时,我想进入upload2.html。但是现在,当我按下按钮时,什么都没有发生?有什么想法吗??
【问题讨论】:
标签: javascript node.js ejs