zoukankan      html  css  js  c++  java
  • ruby的form中常用的控件

    1.radio_button_tag

    new:
    <%= radio_button_tag "feedback_type","T-1" %>
    <label for='T-1' style='display:inline' >T-1</label>&nbsp;&nbsp;
    <%= radio_button_tag "feedback_type","T-2" %>
    <label for='T-2' style='display:inline'>T-2</label>&nbsp;&nbsp;
     
    edit:

      <%= radio_button_tag "feedback_type","T-1", @feedback.feedback_type == "T-1"%>
      <label for='T-1' style='display:inline' >T-1</label>&nbsp;&nbsp;
      <%= radio_button_tag "feedback_type","T-2", @feedback.feedback_type == "T-2" %>
      <label for='T-2' style='display:inline'>T-2</label>&nbsp;&nbsp;

    2.text_field_tag

    <%= text_field_tag "title" %>

    3.image_tag

    <% if @feedback.image != nil %>
    <%= image_tag @feedback.image, :width => 200 %><br/>
    <% end %>
    <%= s.text_field :image %>

    4.select

    <%= f.select :tag_type, options_for_select([["ugc",1],
    ["豆单",2],
    ["剧集",3]],@secondchannel.tag_type) %>
    
    <%= f.select :layout_type, options_for_select(["album","item"],@secondchannel.layout_type) %>
  • 相关阅读:
    电脑不能连接到热点
    常用网络协议
    HVV面试
    【转载】hacker术语
    渗透测试学习路线
    系统安全——可信计算
    rsync文件同步详解
    rabbitmq集群部署高可用配置
    ansible自动化部署之路笔记
    ELK-elasticsearch-6.3.2部署
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/3838532.html
Copyright © 2011-2022 走看看