extends base.pug
block scripts
script(src='/static/index.js')
block style
style
include ../static/style.css
include ../static/styleContact.css
block content
div.container
h1 Contact Us
form(action='/contact', method= "post", class= "myForm")
input(type="text" class= “name” name="name" placeholder="Enter your name")
input(type="phone" class= “myInput” name="phone" placeholder="Enter your name")
input(type="email" class= “myInput” name="email" placeholder="Enter your email")
input(type="text" name="firstname" placeholder="Your name")
button(class="btn")
| Submit
此错误显示在我的 chrome 中
Error: E:\Web design & development\4 javascript\Dance website 75\views\contact.pug:15:34
13| h1 Contact Us
14| form(action='/contact', method= "post", class= "myForm")
> 15| input(type="text" class= “name” name="name" placeholder="Enter your name")
-----------------------------------------^
16| input(type="phone" class= “myInput” name="phone" placeholder="Enter your name")
17| input(type="email" class= “myInput” name="email" placeholder="Enter your email")
18| input(type="text" name="firstname" placeholder="Your name")
Syntax Error: Unexpected character '“'
at makeError (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-error\index.js:34:13)
at Lexer.error (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:62:15)
at Lexer.assertExpression (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:96:12)
at Lexer.attributeValue (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1428:10)
at Lexer.attribute (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1275:30)
at Lexer.attrs (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1454:20)
at Lexer.callLexerFunction (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1647:23)
at Lexer.advance (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1686:12)
at Lexer.callLexerFunction (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1647:23)
at Lexer.getTokens (E:\Web design & development\4 javascript\Dance website 75\node_modules\pug-lexer\index.js:1706:12)
问题是你的引号字符:
“name”
可能LOOK有效,但你需要"
(ASCII 22),而不是“
(ASCII E2)。 “0xe2”是非法的 HTML。