If tag, if tag

Source: Internet
Author: User

If tag, if tag

Function:

· Identify tags and explain the execution of sub-tags that meet the conditions based on the parameter decisions

Usage:

<If x = condition value [else = node serial number]> <tag x = [condition value]>... </Tag>... </if>

· X: Condition value, which is compared with x in the tag. If the value is equal, the tag is interpreted as being executed.

· Else: node number. Optional. If there is no equal x, execute this label.

· Tag: there must be at least one group of subjects to be interpreted based on judgment, which can be WebEasy tags or html tags. Optional for x. The default value is "" string.

Simple judgment:

<Chtml> <if x = 1> <B x = 1> display 1 </B> </if> </chtml>

<B x = 1> 1 </B>

(Example file: _ samples/if.html)

Select judgment:

<Chtml> <if x = 0 else = 1> <B x = 1> show 1 </B> <B> show 2 </B> </if> </chtml>

Output <B> 2 </B>

(Example file: _ samples/if2.html)

Switch judgment:

<Chtml> <if x = 0 else = 3> <B x = 0> show 0 </B> <B x = 1> show 1 </B> <B x = 2> display 2 </B> <B> display 3 </B> </if> </chtml>

<B x = 0> 0 </B>

(Example file: _ samples/ifn.html)

Download and description of light platform Resources

Platform free download: http://download.csdn.net/detail/tx18/8381859

Latest Development Manual download: http://download.csdn.net/detail/tx18/8411089

Development Instance:Light B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8318585

The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please pay attention to the latestDevelopment Manual

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.