跳轉至內容

Curl/示例 2

來自 Wikibooks,開放的世界中開放的書籍
{curl 5.0, 6.0 applet}

|| an example in the declarative style

{Table 
   {row-prototype "Name", "Description", "Cost"},
   {row-prototype "Apple", "A red fruit", "25"},
   {row-prototype "Banana", "A yellow fruit", "25"},
   {row-prototype "Orange", "A reddish-yellow fruit", "50"}
}

|*  Another way to comment 

This is HTML to do the same thing 


 <HTML>
 <BODY>
 <TABLE> 
 <tr><td>Name</td><td>Description</td><td>Cost</td></tr>
 <tr><td>Apple</td><td>A red Fruit</td><td>25</td></tr>
 <tr><td>Banana</td><td>A yellow fruit</td><td>25</td></tr>
 <tr><td>Orange</td><td>A reddish-yellow fruit</td><td>50</td>< /tr>  
 </TABLE>
 </BODY>
 </HTML>
 *|
 

此程式碼顯示一個表格,就像註釋中的宣告性 HTML 一樣。

第 1-4 行是標準的。

第 5 行宣告一個新表格。

第 6-9 行將值放入四行中

第 10 行結束表格。

華夏公益教科書