初次接触jade,并且本人只有一点点的html技术基础,所以以下代码仅供jade基本参考,不妥之处,还望大家指点一二。
doctype html
html(lang="en")
head
title marmot
script(src="javascripts/event.js")
//-其实我也不知道这个路径正确与否,但是应该是这么写吧?event.js是放到public/javascripts下面的
body
h1 this is a test of jade & nodejs
div
h5 hello,this is sangoma,I apply the website for I thought I'm a primary programmer who makes much bug
-var user={name:'sangoma',isVIP:false}
//-从这个地方起到下面是练习if语句,注意var前面的-,然后我一开始定义name以及isVIP的时候把他们作为字符串写上了,即'name'、'isVIP',然后下面
//-调用user.isVIP的时候报错说isVIP未定义
#container
- if (user.isVIP)
Get congratrulations,you are our VIP
- else
div
p
| there is no meanning to write this
div
| so why did you do this meaninglessly job
div
label(for="excel") 姓名