jQuery/Ajax-如何生成有效的POST散列?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jQuery/Ajax-如何生成有效的POST散列?相关的知识,希望对你有一定的参考价值。
var hash = new String(); $.each(elements, function(k) { hash += this['id'] + 'weight: "' + k + '", '; hash += this['id'] + 'children: "' + this['children'].toString() + '", '; }); "if I print hash I get:" node1weight: "0", node1children: "node3,node4", node2weight: "1", node2children: "", node5weight: "2", node5children: "", "but the $_POST array in my php script is empty when using the following line:" $("#field1").load("/nodes/sort", hash);
以上是关于jQuery/Ajax-如何生成有效的POST散列?的主要内容,如果未能解决你的问题,请参考以下文章