js如何调用后台C#的变量和数组?
js如何调用后台C#的变量和数组?
比如说
img1=new Image ();img1.src='<%=imgurl%>';
img2=new Image ();img2.src='images/gongqiu/2.gif';
img3=new Image ();img3.src='images/gongqiu/3.gif';
img4=new Image ();img4.src='images/gongqiu/4.gif';
img5=new Image ();img5.src='images/gongqiu/5.gif';
url1=new Image ();url1.src='#';
url2=new Image ();url2.src='#';
url3=new Image ();url3.src='#';
url4=new Image ();url4.src='#';
url5=new Image ();url5.src='#';
这有八个变量,我要实现在后台用DataTable逐个给这些变量赋值。
当然也可以用其他的方法,目的只有一个,那就是把查询出来的数据赋值给这些js变量。