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. 【有源汇上下界费用流】BZOJ 3876 [Ahoi2014]支线剧情

    题目链接: http://www.lydsy.com:808/JudgeOnline/problem.php?id=3876 题目大意: 给定一张拓扑图(有向无环图),每条边有边权,每次只能从第一个点 ...

  2. Jump Game —— LeetCode

    Given an array of non-negative integers, you are initially positioned at the first index of the arra ...

  3. guid转int

    如果你想生成一个数字序列,你将会获得一个19位长的序列. 下面的方法会把GUID转换为Int64的数字序列.  private static long GenerateIntID()  {       ...

  4. 转:给C++初学者的50个忠告

                                                           转:给C++初学者的50个忠告 1.把C++当成一门新的语言学习(和C没啥关系!真的.): ...

  5. 关于STM32 定时器 PWM 实时调节占空比时,预装载特性

    最近在调试项目的时候遇到一个奇怪的现象:在调试状态下,给定时器捕获比较寄存器赋不同值,能产生不同占空比的波形(图1).反映到器件上也有不同的电压显示,但是在设备运行的时候,就不行了(图2). 图1 图 ...

  6. cf703A Mishka and Game

    A. Mishka and Game time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  7. 使用Array

    public class UsingArray {     public static void output(int[]Array)     {         if(Array!=null)    ...

  8. ARES

    ARES规划是恒生公用技术平台规划,以敏捷Agility.重用性Reused.扩展性Extend.简单性Simple为核心特性与价值取向,规划涉及ARES Server运行支撑平台.ARES Stud ...

  9. Tomcatserverhttps协议配置简单介绍

    一. 数字签名证书制作 1. 用jdk自带的keytool工具生成证书. 2. 导出证书: 3. 交给CA签名认证: 注意:制作具体步骤演示样例參见附录. 二.改动server.xml文件 改动con ...

  10. Valgrind简介:

    Valgrind是动态分析工具的框架.有很多Valgrind工具可以自动的检测许多内存管理和多进程/线程的bugs,在细节上剖析你的程序.你也可以利用Valgrind框架来实现自己的工具. Valgr ...