jQuery param()เมธอด
ตัวอย่าง
ส่งออกผลลัพธ์ของวัตถุต่อเนื่อง:
$("button").click(function(){
$("div").text($.param(personObj));
});
ความหมายและการใช้งาน
วิธี param() สร้างการแสดงลำดับของอาร์เรย์หรือวัตถุ
ค่าที่เป็นอนุกรมสามารถใช้ในสตริงการสืบค้น URL เมื่อทำการร้องขอ AJAX
ไวยากรณ์
$.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 |