僞代碼 - 示例

來源於:jadejavascript

僞代碼: 通常用來模擬真實代碼的一種簡寫方式html

 

僞代碼:java

 1 !!! 5  2 html(lang="en")  3  head  4  title= pageTitle  5  :javascript  6  | if (foo) {  7  | bar()  8  | }  9  body 10  h1 Jade - node template engine 11  #container 12  - if (youAreUsingJade) 13  You are amazing 14  - else 15  Get on it! 16  Get on it! 17  Get on it! 18          Get on it!

 

真實代碼:node

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Jade</title>
    <script type="text/javascript">
      //<![CDATA[
      if (foo) {
          bar()
      }
      //]]>
    </script>
  </head>
  <body>
    <h1>Jade - node template engine</h1>
    <div id="container">
      <p>You are amazing</p>
    </div>
  </body>
</html>    
相關文章
相關標籤/搜索