yii模板中的label标签
<?php echo $form->labelEx($model,'name'); ?>
编译后:
<label for="Project_name" class="required">项目名称 <span class="required">*</span></label>
yii模板中的文本标签

<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>128)); ?>

编译后:

<input size="60"
maxlength="128" name="Project[name]" id="Project_name"
type="text">
yii模板中的error标签
<?php echo
$form->error($model,'name'); ?>
编译后:
<div
class="errorMessage">{变量}</div>
yii模板中的textarea标签
<?php echo
$form->textArea($model,'description',array('rows'=>6,
'cols'=>50)); ?>
编译后:
<textarea rows="6" cols="50"
name="Project[description]" id="Project_description"
class="error"></textarea>
yii模板中的hidden标签
<?php echo
$form->hiddenField($model,'create_time',array('value'=>time()));
?>
编译后:
<input value="1376475100"
name="Project[create_time]" id="Project_create_time"
type="hidden">
yii模板中的password标签
<?php echo
$form->passwordField($model,'password');
?>
编译后:
<input name="Project[password]" id="Project_password"
type="password">
yii模板中的url标签
<?php echo
$form->urlField($model,'url');
?>
编译后:
<input name="Project[url]" id="Project_url"
type="url">
yii模板中的radio标签
<?php echo
$form->radioButtonList($model, 'update_time',
array('1'=>'分页','0'=>'不分页'));
?>
编译后:
<input id="ytProject_update_time" type="hidden"
value="" name="Project[update_time]">
<span
id="Project_update_time"><input
id="Project_update_time_0" value="1" type="radio"
name="Project[update_time]"> <label
for="Project_update_time_0">分页</label><br>
<input id="Project_update_time_1" value="0"
type="radio"
name="Project[update_time]"> 
<label
for="Project_update_time_1">不分页</label></span>
yii模板中的file标签
<?php echo
$form->fileField($model, 'update_time');
?>
编译后:
<input id="ytProject_update_time" type="hidden"
value="" name="Project[update_time]">
<input name="Project[update_time]"
id="Project_update_time" type="file">
yii模板中的button标签
<?php echo
CHtml::submitButton($model->isNewRecord ? '创建' :
'保存'); ?>
编译后:
<input type="submit" name="yt0"
value="创建">
yii模板中的checkBox标签
<?php echo
$form->checkBox($model,
'update_time',array('checked'=>'checked'));
?>
编译后:
<input id="ytProject_update_time" type="hidden"
value="0" name="Project[update_time]">
<input checked="checked"
name="Project[update_time]" id="Project_update_time" value="1"
type="checkbox">
yii模板中的select标签
<?php echo
$form->dropDownList($model, 'update_time',
array('1'=>'分页','0'=>'不分页'));
?>
编译后:
<select name="Project[update_time]"
id="Project_update_time">
<option
value="1">分页</option>
<option
value="0">不分页</option>
</select>
yii模板中的select标签
<?php echo
$form->listBox($model, 'update_time',
array('1'=>'分页','0'=>'不分页'));
?>
编译后:
<select size="4" name="Project[update_time]"
id="Project_update_time">
<option
value="1">分页</option>
<option
value="0">不分页</option>
</select>
yii模板中的checkbox标签
<?php echo
$form->checkBoxList($model, 'update_time',
array('1'=>'分页','0'=>'不分页'));
?>
编译后:
<input id="ytProject_update_time" type="hidden"
value=""
name="Project[update_time]"><span
id="Project_update_time"><input
id="Project_update_time_0" value="1" type="checkbox"
name="Project[update_time][]"> <label
for="Project_update_time_0">分页</label><br>
<input id="Project_update_time_1" value="0"
type="checkbox" name="Project[update_time][]">
<label
for="Project_update_time_1">不分页</label></span>
yii模板中的date标签
 <?php echo
$form->dateField($model, 'update_time');
?>
编译后:
<input name="Project[update_time]"
id="Project_update_time"
type="date">
yii模板中的number标签
<?php echo
$form->numberField($model, 'number');
?>
编译后:
<input name="Project[number]" id="Project_number"
type="number">
yii模板中的email标签
<?php echo
$form->emailField($model, 'email');
?>
编译后:
<input name="Project[email]" id="Project_email"
type="email">
yii模板中的label标签
 <?php echo
$form->label($model, 'update_time');
?>
编译后:
<label
for="Project_update_time">更新时间</label>
 

yii 标签用法(模板)的更多相关文章

  1. Yii系列总结:yii 标签用法

    yii 常用标签:label标签.文本标签.error标签.textarea标签.hidden标签.password标签.url标签.radio标签.file标签.button标签.checkBox标 ...

  2. ThinkPHP模板IF标签用法详解

    投稿:shichen2014 字体:[增加 减小] 类型:转载 时间:2014-07-01 我要评论 这篇文章主要介绍了ThinkPHP模板IF标签用法,需要的朋友可以参考下 ThinkPHP的IF标 ...

  3. Thinkphp中的内置标签用法

    Thinkphp中的内置标签有:Volist,Foreach,For,Switch,比较标签,范围判断标签,IF,Present,Empty,Defined,Assign,Define,标签嵌套,im ...

  4. H5 新标签用法及解释

    HTML 5 是一个新的网络标准,目标在于取代现有的 HTML 4.01, XHTML 1.0 and DOM Level 2 HTML 标准.它希望能够减少浏览器对于需要插件的丰富性网络应用服务(p ...

  5. 【JSP】<meta>标签用法

    转载自:http://blog.sina.com.cn/s/blog_65c74cce0102v39z.html  非常感谢这位博主,急着用,改日再细细品味重新整理这篇博文. http-equiv M ...

  6. Web前端设计:Html强制不换行<nobr>标签用法代码示例

    在网页排版布局中比如文章列表标题排版,无论多少文字均不希望换行显示,需要强制在一行显示完内容.这就可以nobr标签来实现.它起到的作用与word-break:keep-all 是一样的.nobr 是 ...

  7. JAVA中的break[标签]continue[标签]用法

    原文:JAVA中的break[标签]continue[标签]用法 注意:JAVA中的标签必须放在循环之前,且中间不能有其他语句.例如:tag:for或while或do--while; 1.使用brea ...

  8. c-fmt-fn标签用法

      c-fmt-fn标签用法 CreateTime--2017年1月6日15:48:43 Author:Marydon 一.参考链接 http://blog.csdn.net/fmwind/artic ...

  9. Django项目中模板标签及模板的继承与引用【网站中快速布置广告】

    Django项目中模板标签及模板的继承与引用 常见模板标签 {% static %} {% for x in range(x) %}{% endfor %} 循环的序号{% forloop %} 循环 ...

随机推荐

  1. HDOJ(HDU) 2106 decimal system(进制相互转换问题)

    Problem Description As we know , we always use the decimal system in our common life, even using the ...

  2. [基础] 重载的时候什么时候用引用&

    一般返回值还要继续被处理,而不仅仅是得到其值的时候,返回引用& 一般有[], =, ++, --, 还有输入输出运算符<<, >> Classtype &ope ...

  3. [tools] sublime 使用记录

    1. 目录下的文本搜索功能(自带) 1). 把文件夹拖到 sublime 上 2). 在 sublime 上展开要搜索的目录,右击,选择[find in folder] 2. sublime cons ...

  4. LeetCode (13): 3Sum Closest

    https://leetcode.com/problems/3sum-closest/ [描述] Given an array S of n integers, find three integers ...

  5. zzuoj 10408: C.最少换乘【最短路dijkstra】

    10408: C.最少换乘 Time Limit: 2 Sec  Memory Limit: 128 MBSubmit: 31  Solved: 8[Submit][Status][Web Board ...

  6. 那些年我用awk时踩过的坑——awk使用注意事项

    由于项目经历原因,经常使用awk处理一些文本数据.甚至,我特意下载了一个windows上的awk:gawk.exe,这样在windows上也能享受awk处理数据的方便性,. 俗话说,"常在河 ...

  7. Spring MVC返回对象JSON

    @RestController 用于返回对象,会自动格式化为JSON     @RequestMapping("/user2")     public User2 user2(Mo ...

  8. [Javascript] Logging Pretty-Printing Tabular Data to the Console

    Learn how to use console.table to render arrays and objects in a tabular format for easy scanning ov ...

  9. QT 内存泄露 检测

      一:问题出现     最近几天在做一个QT程序,IPX的检测控制程序.需要全天候运行.自己做完了,然后就运行.使用  top|grep TP2  来动态检测程序的CPU,内存占用律.不幸的是,一晚 ...

  10. iPad横竖屏代码适配

    你可能非常了解用不同的方式去适配不同尺寸的iPhone屏幕,在适配iPhone屏幕时你需要考虑的只是屏幕大小变化带来的UI元素间隔的变化,但是在iPad上主要针对的是横竖屏下完全不同的UI元素的布局, ...