jQueryその他のparam()メソッド
例
シリアル化されたオブジェクトの結果を出力します。
$("button").click(function(){
$("div").text($.param(personObj));
});
定義と使用法
param()メソッドは、配列またはオブジェクトのシリアル化された表現を作成します。
シリアル化された値は、AJAXリクエストを行うときにURLクエリ文字列で使用できます。
構文
$.param(object,trad)
Parameter | Description |
---|---|
object | Required. Specifies an array or object to serialize |
trad | Optional. A Boolean value specifying whether or not to use the traditional style of param serialization |