我希望有人能帮助我解决我的哈巴狗错误。我的主页正常,但联系人显示错误
I was hoping someone will be help me to fix my pug error. My home page is working but contact is showing error
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
错误:E:\Web design & development javascript\Dance 网站 75\views\contact.pug:15:34
13| h1 联系我们
14|表单(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")
语法错误:意外的字符“”
在 makeError (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-error\index.js:34:13)
在 Lexer.error (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:62:15)
在 Lexer.assertExpression (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:96:12)
在 Lexer.attributeValue (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1428:10)
在 Lexer.attribute (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1275:30)
在 Lexer.attrs (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1454:20)
在 Lexer.callLexerFunction (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1647:23)
在 Lexer.advance (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1686:12)
在 Lexer.callLexerFunction (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1647:23)
在 Lexer.getTokens (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1706:12)
问题是你的引用字符:“name”
可能 LOOK 有效,但你需要 "
(ASCII 22),而不是 “
(ASCII E2)。 “0xe2”是非法的 HTML.
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
错误:E:\Web design & development javascript\Dance 网站 75\views\contact.pug:15:34 13| h1 联系我们 14|表单(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")
语法错误:意外的字符“” 在 makeError (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-error\index.js:34:13) 在 Lexer.error (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:62:15) 在 Lexer.assertExpression (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:96:12) 在 Lexer.attributeValue (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1428:10) 在 Lexer.attribute (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1275:30) 在 Lexer.attrs (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1454:20) 在 Lexer.callLexerFunction (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1647:23) 在 Lexer.advance (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1686:12) 在 Lexer.callLexerFunction (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1647:23) 在 Lexer.getTokens (E:\Web design & development javascript\Dance 网站 75\node_modules\pug-lexer\index.js:1706:12)
问题是你的引用字符:“name”
可能 LOOK 有效,但你需要 "
(ASCII 22),而不是 “
(ASCII E2)。 “0xe2”是非法的 HTML.