假设我们有一个这样的数组:
var MrArray = new Array(5);
MrArray['one']='oneValue';
MrArray['two']='twoValue';
MrArray['three']='threeValue';
MrArray['four']='fourValue';
MrArray['five']='fiveValue';
Run Code Online (Sandbox Code Playgroud)
好?数组是关联的.我们有字符串键和字符串值.现在!我如何从中选择一个随机值? 编辑:我想这样使用:
<A href="Array value Here">Array Key Here</a>
Run Code Online (Sandbox Code Playgroud)
问候萨姆
firebug中页面的来源不正确 - 它显示了body标签后的head标签内容:
<head>empty</head><body>head content here...</body>
Run Code Online (Sandbox Code Playgroud)
有什么问题?