示例1:
<script type="text/javascript">

var hash=...{
"百度" :"http://www.baidu.com/",
"Google" :"http://www.google.com/",
"微软" :"http://www.microsoft.com/",
"博客园" :"http://www.cnblogs.com/"
};


function showUrl(element)...{ //使用哈稀对象
alert(hash[element.value])
}
</script>
<script type="text/javascript">
var hashtable = new Obejct();
hashtable["百度"]="http://www.baidu.com/";
hashtable["Google"]="http://www.google.com/";
...


function showUrl(element)...{ //使用哈稀对象
alert(hash[element.value])
}
</script>
<script type="text/javascript">
var hash=...{
"百度" :"http://www.baidu.com/",
"Google" :"http://www.google.com/",
"微软" :"http://www.microsoft.com/",
"博客园" :"http://www.cnblogs.com/"
};

function showUrl(element)...{ //使用哈稀对象
alert(hash[element.value])
}
</script>示例2:
<script type="text/javascript">
var hashtable = new Obejct();
hashtable["百度"]="http://www.baidu.com/";
hashtable["Google"]="http://www.google.com/";
...

function showUrl(element)...{ //使用哈稀对象
alert(hash[element.value])
}
</script>
2063

被折叠的 条评论
为什么被折叠?



