输入的内容是自闭的,不应包含任何内容 [英] input is self closing and should not have content
问题描述
当我加载Express页面时,出现以下错误:
When I load my Express webpage I'm getting the following error:
快递 500错误:/app/views/index.jade:114 112 | td 2113 | td 4年> 114 |输入的内容是自动关闭的,不应包含任何内容.
Express 500 Error: /app/views/index.jade:114 112| td 2 113| td 4 years > 114| input is self closing and should not have content.
112| td 2
113| td 4 years
> 114|
input is self closing and should not have content.
at Object.Compiler.visitTag (/app/node_modules/jade/lib/compiler.js:434:15)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitBlock (/app/node_modules/jade/lib/compiler.js:278:12)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitTag (/app/node_modules/jade/lib/compiler.js:443:12)
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:210:37)
at Object.Compiler.visit (/app/node_modules/jade/lib/compiler.js:197:10)
at Object.Compiler.visitBlock (/app/node_modules/jade/lib/compiler.js:278:12)
只有在服务器上使用领班启动在本地运行时,此选项才会显示.
This doesn't show up when run locally with foreman start, only when its on the server.
推荐答案
好像您的输入标记中包含内容.在HTML中,输入标签不能包含内容,因此
因此,您应该删除jade文件中输入标签之后的所有空格或字符.
例如:
input(type="text",name="whatever") something
应该是
input(type="text",name="whatever",value="something")
Looks like you've got content inside your input tags. In HTML, input tags can't have content,
therefore you should delete any whitespace or characters following input tags in your jade file.
Ex:
input(type="text",name="whatever") something
should be input(type="text",name="whatever",value="something")
这篇关于输入的内容是自闭的,不应包含任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!