【发布时间】:2011-04-02 23:49:36
【问题描述】:
希望将变量从 c# 传递到 javascript 以使用一些 jquery 代码。传递双精度、整数、字符串、数组。有谁知道怎么做?
例如,如果我在 c# 中有此代码片段:
string blah = "this is a blah string";
我想将它传递给 javascript,以便我可以在 jquery 中使用鼠标悬停事件:
$('#myDiv').mouseover(function(){ //do something with my 'blah' string });
【问题讨论】:
标签: c# javascript variables