prototype使用$H()函数

时间:2009-03-27    点击:1328   

$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
}

testHash();
</script>

prototype-1.6.0.2.js下载    演示

可以拖动弹出窗口的小效果
prototype使用$()方法
prototype使用$F()函数
prototype使用$A()函数
prototype使用$H()函数
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved