w3pop.com :: ÍøÂçѧԺ :: XForms :: XForms Ñ¡Ôñ¿Ø¼þ
The user interface of XForms uses XForms controls.
XForms Óû§½çÃæÊ¹Óà XForms ¿Ø¼þ¡£
The select1 control is used for selecting one item from a list of items:
select1 ¿Ø¼þÓÃÓÚ´ÓÒ»¸öÏîÄ¿ÁбíÖÐѡȡһ¸öÏîÄ¿£º
<select1 ref="status"> |
In the example above, the user can choose one of to values, Male or Female. The data stored in the XForms instance (XML document) will be M or F.
ÔÚÉÏÃæµÄÀý×ÓÖУ¬Óû§¿ÉÔÚÁ½¸öÖµÖÐÑ¡ÔñÆäÖÐÖ®Ò»£¬Male »òÕß Female¡£´æ´¢ÔÚ XForms ʵÀý£¨XML Îĵµ£©ÖеÄÊý¾Ý½«ÊÇ M »ò F¡£
Try it yourself
×Ô¼ºÊÔÊÔ°É
The select control is used for selecting items (one or many) from a list of items:
Select ¿Ø¼þÓÃÓÚ´ÓÒ»¸öÏîÄ¿ÁбíÖÐѡȡÏîÄ¿£¨Ò»¸ö»ò¶à¸ö£©£º
<select ref="languages"> |
In the example above, the user can choose one or many of the values.
ÔÚÉÏÊöÀý×ÓÖУ¬Óû§¿ÉÒÔÑ¡ÔñÒ»¸ö»ò¶à¸öÖµ¡£
The range control is used for selecting a value from a range of values:
Range ¿Ø¼þÓÃÓÚ´ÓÖµµÄÒ»¸ö·¶Î§ÄÚѡȡֵ£º
<range ref="length" start="0" end="100" step="5"> |
In the example above, the user can choose a value between 0 and 100 in steps of 5.
ÔÚÉÏÃæµÄÀý×ÓÖУ¬Óû§¿É°´ÕÕ²½³¤ 5 Ñ¡Ôñ½éÓÚ 0 µ½ 100 Ö®¼äµÄij¸öÖµ¡£
ÆÀÂÛ (0)
All