有更优雅和正确的方法。不要忘记可用性。并跳过冒号这不是一个纸质表格!
form(name="input", action="html_form_action.asp", method="get")
key Username
input(type="text", name="user")
key Password
input(type="password", name="pswd")
input(type="submit", value="Submit")
对于我使用的混入形式呈现。它使我的代码可重用和灵活。看看这里:
mixin text(name, value, title)
key=title
input(type="text" name=name value=value)
mixin password(name, value, title)
key=title
input(type="password" name=name value=value)
mixin submit(name, value)
input(type="submit" name=name value=value)
form(name="input", action="html_form_action.asp", method="post")
mixin text('user', null, 'User')
mixin password('pswd', null, 'Password')
mixin submit('do', 'Login')
这是怎么回事? –
我需要翻译成翡翠。 –
我无法在此发布,缩进将无法使用。除了我刚开始使用Express.js和Jade;我甚至不知道从哪里开始。 –