希望能够从c#传递变量到javascript,以便使用一些jquery代码。需要传递double、int、string和array类型的变量,请问有谁知道如何做到这点?
例如,在c#中我有以下代码片段:
string blah = "this is a blah string";
我想把这个内容传递给JavaScript,以便在jQuery中使用mouseover事件:
$('#myDiv').mouseover(function(){ //do something with my 'blah' string });