有一个变量为I
I="ABC"
现在abc是一个文本框的ID
我想通过I来访问abc.name
我该怎么办呢?
另外我还想问一下,在客户端的脚本中可以使用服务器端的语名吗?
如
<SCRIPT LANGUAGE=javascript>
<!--
<% for i = 1 to 100
response.write ("this is a book")
next
%>
//-->
</SCRIPT>
上面的写法好象是不行,哪我又该怎么写呢???
"this is a book" is not a valid javascript statement, try this:
<SCRIPT LANGUAGE=javascript>
<!--
var s = new Array(100);
<% for i = 0 to 99
%>
s[<%=i%>] = "<%response.write "this is a book" %>";
<%
next
%>
//-->
</SCRIPT>