问题描述
大家好,
我有一个ASP.NET网站,其中一个页面包含javascript,这是一个
检查数据网格中的任何数据是否已更改。我的问题是它在填充数据网格后需要花费大量时间在javascript
中填充数组。
我想要做的是在
服务器端(.vb)创建一个逗号分隔的字符串,然后让javascript通过array()获取它....
我想弄清楚我的问题是如何将服务器端函数中创建的字符串
传递回客户端,以便javascript
函数可以读取它并填充一个数组。
有没有人有任何指示如何做到这一点?
谢谢你,
Lyners
Hello all,
I have an ASP.NET website where one of my pages contain javascript that is a
check to see if anydata within a datagrid has changed. My problem is that it
takes a considerable amount of time to populate the array in the javascript
after the datagrid is populated.
What I am thinking of doing is creating a comma delimited string on the
server side (.vb) and then have the javascript pick it up through array()....
My problem that I am trying to figure out is how do I pass a string that is
created in a server side function back to the client so that a javascript
function could read it and populate an array.
Does anybody have any pointers how to do this?
Thank you,
Lyners
推荐答案
这篇关于将字符串从服务器传递到客户端javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!