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. IOI 2009:Mecho

    IOI2009 Mecho Time Limit: 10000ms Memory Limit: 262144KB This problem will be judged on SPOJ. Origin ...

  2. Contains Duplicate III —— LeetCode

    Given an array of integers, find out whether there are two distinct indices i and j in the array suc ...

  3. cf703C Chris and Road

    C. Chris and Road time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  4. 《算法问题实战策略》-chaper8-动态规划法

    Q1:偶尔在电视上看到一些被称为“神童”的孩子们背诵小数点以后几万位的圆周率.背诵这么长的数字,可利用分割数字的方法.我们用这种方法将数字按照位数不等的大小分割后再背诵. 分割形式如下: 所有数字都相 ...

  5. JavaScript中bind、call、apply函数用法详解

    在给我们项目组的其他程序介绍 js 的时候,我准备了很多的内容,但看起来效果不大,果然光讲还是不行的,必须动手.前几天有人问我关于代码里 call() 函数的用法,我让他去看书,这里推荐用js 写服务 ...

  6. Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project taotao-manager-web: Failed to clean project: Failed to delete \target\tomcat\logs\access_log.201

    点击console右上角叉号然后再点击红色小方形terminate

  7. angularJS constant和value

    angularJS可以通过constant(name,value)和value(name,value)对于创建服务也是很重要的. 相同点是:都可以接受两个参数,name和value. 区别: 1.co ...

  8. Java RTTI和反射

    一.Java的RTTI  RTTI(Run-Time Type Identification,通过运行时类型识别)的含义就是在运行时识别一个对象的类型,其对应的类是Class对象,每个java里面的类 ...

  9. Java同步工具类总结

    先谈谈闭锁和栅栏的区别: 1.关键区别在于,所有线程必须同时到达栅栏位置,才能继续执行. 2.闭锁用于等待某一个事件的发生,举例:CountDownLatch中await方法等待计数器为零时,所有事件 ...

  10. Android CountDownTimer 倒计时

    摘自:http://www.cnblogs.com/over140/archive/2011/12/20/2294220.html 继承关系 public abstract class CountDo ...