如何使用变量预先填充HTML输入字段值?在这种情况下,模态体变量.我读到了使用document.write,但我们如何将它与变量一起使用?
我们正在使用Mandrill和完整日历.
非常感谢!
码:
{
title: 'Event',
start: '2016-03-26T11:00:00',
end: '2016-03-26T12:00:00',
},
],
eventClick: function(event) {
console.log(event)
// alert(event.start.format('MMMM Do YYYY'))
var start = event.start.format('MMMM Do YYYY'),
end = event.end.format('MMMM Do YYYY'),
html = '<p>Starts: ' + start + '<p>';
html += '<p>Ends: ' + end + '<p>';
var modal = $("#modal");
modal.find(".modal-title").html(event.title);
modal.find('.modal-body').html(html)
modal.modal();
}
});
});
});//]]>
</script>
<script type="text/javascript">
$(document).ready(function() {
// Generate a simple captcha
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + …
Run Code Online (Sandbox Code Playgroud) 我添加什么 Javascript 来定义 res?谢谢!
错误信息:
参考错误:未定义 res
代码:
app.get('/', function(request, response) {
res.sendFile(path.join(__dirname, '/public', 'index.html'));
})
Run Code Online (Sandbox Code Playgroud)