字符串连接问题
aword=new array(5);
bword=new array(9);
cword=new array(9);
......
zword=new array(9);
function show(s)
{
document.write("<a href="www.csdn.net">)
document.write(....)
document.write("</a>")
}
我想通过不同的"s"来调用不同的数组"s"+word数组,不知道这个document.write如何写.
问题点数:37、回复次数:2Top
1 楼karma(无为MS MVP)回复于 2001-11-19 06:23:22 得分 37
to get the array you want, use eval(s+"word"), then to get some value, use
eval(s+"word")[index]:
document.write (eval(s+"word")[3]);
by the way, Javascript is case-sensitive, you should use
aword = new Array(9), not new array(9)Top
2 楼okeyes(竹子)回复于 2001-11-19 18:23:44 得分 0
谢谢无为兄!!!Top




