we标签

版权声明:本文为博主原创文章,博主允许自由转载。 https://blog.csdn.net/tx18/article/details/44803931

功能:

·        辅助标签,配合其他标签使用,防止与标准html标签冲突

·        别名为test

用法:

<we [name=key]>[value]</we><test [name=key]>[value]</test>

在前面的例子中咱们已经多次看到过we标签,再看看下面的例子进一步理解

把信息放进书包:

<chtml>
  <bag id=temp>
    <we name=test>测试</we>
    <testname=show>显示</test>  </bag>
</chtml>
<p>@{temp:test}</p>
<p>@{temp:show}</p>

引入xml文件:

<chtml><we>@{resAdmin.xml:e}</we></chtml>

作为if的子标签:

<chtml>
  <if x=1 else=1>
    <we x=1>
       <div>显示层</div>
       <p>同时显示段落</p>
    </we>    <we> 
      <p>显示段落</p>
       <div>同时显示层</div>
    </we> 
</if>
</chtml>

轻松互联网开发平台(Easy Do IT)资源下载

平台及最新开发手册免费下载:http://download.csdn.net/detail/tx18/8464425

开发实例:轻开B2C电子商务网站,免费下载:http://download.csdn.net/detail/tx18/8318585

轻开平台会不定期升级为大家提供更多强大而Easy的功能,请留意下载最新的版本


阅读更多
换一批

Are We There Yet?

03-15

Laurie's little brother Joey has been playing Find the Cookie with her. However, after the 32,767th time, Laurie is tired of it. She wants to write a program to keep the boy occupied. Write a program to simulate a game of Find the Cookie. The game takes place in a long narrow hall, so Joey can only move forward and backward, not right or left. At the beginning of each game, a cookie is placed in the hall (not at the center of the hall) and Joey starts at the center of the hall. Joey attempts to find the cookie. He does this by moving to another point in the hall, whereupon the computer tells him whether he is "warmer" (he has moved closer to the cookie than his last position), "colder" (he has moved farther away from the cookie than his last position), "same" (he has not moved closer or farther away from the cookie), or he has reached the cookie. Joey continues until he exactly reaches the location of the cookie, which always happens within 20 moves. nnnInputnnEach input line represents a new game. Each input line contains at least two and at most 21 integers separated by whitespace. The integers represent locations along the hall, expressed in units of feet. Joey begins each game at location 0 feet. The first integer on an input line is the location of the cookie. This integer is guaranteed to be different from 0. The remaining integers represent locations Joey moves to, in order. Joey will never move more than 5280 feet from his original location. Joey will always reach the cookie in each game, and this will be the last move on the input line. Your program should stop processing input lines when the cookie is located at 5280 feet (a mile from the center of the hall is way too far for Joey to go for only one cookie).nnnOutputnnFor each location that Joey moves to, determine whether he is warmer, colder, the same, or has reached the cookie. Have a blank line between the output for different input lines. Follow the format in the Sample Output.nnnSample Inputnn5 10 11 12 3 4 5n3 10 10 7 3n12 5 -3 1 4 6 7 8 9 12n5280 10nnnSample OutputnnMoving from 0 to 10: same.nMoving from 10 to 11: colder.nMoving from 11 to 12: colder.nMoving from 12 to 3: warmer.nMoving from 3 to 4: warmer.nMoving from 4 to 5: found it!nnMoving from 0 to 10: colder.nMoving from 10 to 10: same.nMoving from 10 to 7: warmer.nMoving from 7 to 3: found it!nnMoving from 0 to 5: warmer.nMoving from 5 to -3: colder.nMoving from -3 to 1: warmer.nMoving from 1 to 4: warmer.nMoving from 4 to 6: warmer.nMoving from 6 to 7: warmer.nMoving from 7 to 8: warmer.nMoving from 8 to 9: warmer.nMoving from 9 to 12: found it!

没有更多推荐了,返回首页