Ruby on Rails HTML表單語句大全[Z]
表單開始標籤:
:save }, { :method => :post } %>
Use :multipart => true to define a Mime-Multipart form (for file uploads)
表單結束標籤:
文字框 Text fields
生成:
例項:
text_field "post", "title", "size" => 20
size="20" value="}" />
隱藏框:
密碼框:
檔案框
Rails Textarea框
例項:
text_area "post", "body", "cols" => 20, "rows" => 40
單選框 Radio Buttonsvalue, options %>
例項:
radio_button "post", "category", "rails"
radio_button "post", "category", "java"
value="rails"
checked="checked" />
value="java" />
多選框 Check Box
value, off_value %>
例項
check_box "post", "validated" # post.validated? returns 1 or 0
value="1" checked="checked" />
value="0" />
check_box "puppy", "gooddog", {}, "yes", "no"
value="yes" />
value="no" />
下拉選單框 Select Menu
select "post",
"person_id",
Person.find_all.collect {|p| [ p.name, p.id ] },
{ :include_blank => true }
Collection Selection
value %>
日期選擇框:
例項:
date_select "post", "written_on"
date_select "user", "birthday", :start_year => 1910
date_select "user", "cc_date", :start_year => 2005,
:use_month_numbers => true,
:discard_day => true,
:order => [:year, :month]
datetime_select "post", "written_on"
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9934490/viewspace-1001387/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rails on ruby,ruby on rails 之程式碼塊(二)AI
- HTML語法大全_html語言語法大全(必看)HTML
- [ruby] rails renderAI
- sql語句大全SQL
- MySQL語句大全MySql
- JS語句大全JS
- ruby on rails 小技巧AI
- Ruby on Rails 相關AI
- Ruby On Rails 技術AI
- MySQL SHOW 語句大全MySql
- 常用 SQL 語句大全SQL
- Ruby on Rails Ping ++ 支付AI
- do |r| Ruby & Rails endAI
- 什麼是 Ruby on Rails?AI
- 如何提高 Ruby On Rails 效能AI
- Ruby on Rails 生成指定版本的 Rails 專案AI
- BI工具術語表大全:從字母A-Z全面收錄
- 經典SQL語句大全SQL
- oracle查詢語句大全Oracle
- ruby on rails筆記和理解AI筆記
- ruby on rails 伺服器配置AI伺服器
- Ruby on Rails?有人會用嗎?AI
- .nil? .empty? .blank? .present? in Ruby on RailsAI
- 如何提高 Ruby On Rails 的效能?AI
- 資料庫-單表結構-建表語句資料庫
- SQL單表查詢語句總結SQL
- Oracle資料庫語句大全Oracle資料庫
- Sa提權Sql語句大全SQL
- Ruby on Rails Mountable vs. Full EngineAI
- Ruby on rails專案中 引入BootstrapAIboot
- 使用 Ruby on Rails 開發 Go 介面AIGo
- java 和 Ruby On Rails的對比JavaAI
- Ruby社群應該去Rails化了AI
- 幽默:Ruby on Rails團隊提出Rail治理名單引發爭議AI
- PHP+MySQL 手工注入語句大全PHPMySql
- mysql alter語句用法總結大全MySql
- 【轉】經典SQL語句大全2SQL
- 【轉】經典SQL語句大全1SQL