44件ヒット
[1-44件を表示]
(0.176秒)
種類
- 特異メソッド (22)
- インスタンスメソッド (22)
モジュール
-
CGI
:: HtmlExtension (22) - URI (22)
キーワード
-
encode
_ www _ form (11) -
encode
_ www _ form _ component (11)
検索結果
先頭4件
- CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") -> String - CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") { . . . } -> String - URI
. encode _ www _ form(enum , enc=nil) -> String - URI
. encode _ www _ form _ component(str , enc=nil) -> String
-
CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") -> String (24807.0) -
form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...
form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param method method 属性の値として "get" か "post" を指定します。
@param action action 属性の値を指定します。デフォルトは現在の CGI ス......"application/x-www-form-urlencoded" です。
例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get", "url"){ "string" }......# <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>... -
CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") { . . . } -> String (24807.0) -
form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...
form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param method method 属性の値として "get" か "post" を指定します。
@param action action 属性の値を指定します。デフォルトは現在の CGI ス......"application/x-www-form-urlencoded" です。
例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get", "url"){ "string" }......# <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>... -
URI
. encode _ www _ form(enum , enc=nil) -> String (15560.0) -
enum から URL-encoded form data を生成します。
...URL-encoded form data を生成します。
HTML5 で定義されている application/x-www-form-urlencoded 形式の
文字列を生成します。
enum には通常 [key, value] という形の配列の配列を渡します。
以下の例を見てください。
require 'uri'
URI.encode_w......ww_form([["a", "1"], ["b", "2"], ["c", "x yz"]])
# => "a=1&b=2&c=x+yz"
実際には、each のブロック呼び出しで [key, value] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。
require 'uri'
URI.encode_www_form({"a"=>"1", "b"......のため
送るデータのエンコーディングを変換したい場合はあらかじめ
変換しておいてください(例えば ASCII incompatible なものを
UTF-8 に変換する場合など)。
各要素のエンコーディングがばらばらの場合もあらかじめエンコー... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (15548.0) -
文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。
...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。
通常は URI.encode_www_form を使うほうがよいでしょう。
このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他......、変換します。
このメソッドは
https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%......%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}
@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form...