prototype.js的系列文章——$H()函数

来源:互联网 发布:如何在电脑上安装java 编辑:程序博客网 时间:2024/05/01 21:26

$H()方法把对象转化成可枚举的貌似联合数组Hash对象。

<script>

function testHash()
{
//let's create the object
var a = {
first: 10,
second: 20,
third: 30
};

//now transform it into a hash
var h = $H(a);
alert(h.toQueryString()); //displays: first=10&second=20&third=30
}

</script>
 
原创粉丝点击