Last active
December 17, 2015 17:49
-
-
Save kejyun/5648885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 程式 --> | |
<%= label_tag(:q, "欄位名稱") %> | |
<!-- 輸出 --> | |
<label for="q">欄位名稱</label> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= text_field_tag(:q , "輸入搜尋的關鍵字" ) %> | |
<!-- 輸出 --> | |
<input id="q" name="q" type="text" value="輸入搜尋的關鍵字" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= text_field(:person, :name , :value=> "輸入搜尋的姓名" , :placeholder =>"預設字串") %> | |
<!-- 輸出 --> | |
<input id="person_name" name="person[name]" placeholder="預設字串" size="30" type="text" value="輸入搜尋的姓名"> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= password_field_tag(:password , "abc123") %> | |
<!-- 輸出 --> | |
<input id="password" name="password" type="password" value="abc123" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= hidden_field_tag(:user_id, "3") %> | |
<!-- 輸出 --> | |
<input id="user_id" name="user_id" type="hidden" value="3" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= submit_tag("送出查詢") %> | |
<!-- 輸出 --> | |
<input name="commit" type="submit" value="送出查詢" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= check_box_tag(:pet) %> | |
<%= label_tag(:pet, "是否有養寵物") %> | |
<!-- 輸出 --> | |
<input id="pet" name="pet" type="checkbox" value="1" /> | |
<label for="pet">是否有養寵物</label> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= radio_button_tag(:gender , "男" , :class=>"gender") %> | |
<%= label_tag(:gender , "男") %> | |
<%= radio_button_tag(:gender , "女" , :class=>"gender") %> | |
<%= label_tag(:gender , "女") %> | |
<!-- 輸出 --> | |
<input checked="checked" id="gender__" name="gender" type="radio" value="男" /> | |
<label for="gender">男</label> | |
<input checked="checked" id="gender__" name="gender" type="radio" value="女" /> | |
<label for="gender">女</label> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= text_area_tag(:message, "訊息文字", :size => "24x6") %> | |
<!-- 輸出 --> | |
<textarea cols="24" id="message" name="message" rows="6">訊息文字</textarea> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= search_field(:user, :name) %> | |
<!-- 輸出 --> | |
<input id="user_name" name="user[name]" size="30" type="search" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= telephone_field(:user, :phone) %> | |
<!-- 輸出 --> | |
<input id="user_phone" name="user[phone]" size="30" type="tel" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= url_field(:user, :url) %> | |
<!-- 輸出 --> | |
<input id="user_url" name="user[url]" size="30" type="url" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= email_field(:user, :email) %> | |
<!-- 輸出 --> | |
<input id="user_email" name="user[email]" size="30" type="email" /> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= select_tag(:city_id, options_for_select([['台北', 1], ['台中', 2], ['台南', 3], ['台東', 3]])) %> | |
<!-- 輸出 --> | |
<select id="city_id" name="city_id"> | |
<option value="1">台北</option> | |
<option value="2">台中</option> | |
<option value="3">台南</option> | |
<option value="3">台東</option> | |
</select> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= select_date Date.today, :prefix => :start_date %> | |
<!-- 輸出 --> | |
<select id="start_date_year" name="start_date[year]"></select> | |
<select id="start_date_month" name="start_date[month]"></select> | |
<select id="start_date_day" name="start_date[day]"></select> | |
<!------------------ 強大的分隔線 ------------------> | |
<!-- 程式 --> | |
<%= file_field_tag 'picture' %> | |
<!-- 輸出 --> | |
<input id="picture" name="picture" type="file"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment