使用css代码可以禁止网页滚动,但是会使浏览器窗口的滚动条消失。而js代码则可以让页面禁止滚动的同时,保留滚动条的显示状态,而且滚动条的位置不变。
javascript代码
var keys = { 37: 1, 38: 1, 39: 1, 40: 1 };
function preventDefault(e) {
e = e || window.event;
if (e.preventDe...
ejs 3.1.5版本,根据网上的视频教程,使用include引用公共部分的html文件时出现错误
引入代码
<%include footer.html%>
报错
SyntaxError: Unexpected identifier in E:\project\nodejs\views\index.html while compiling ejs
If the above...