2011-01-21 69 views
0

我使用JQuery填充下拉列表。每当我选择的任何项目从下拉列表(即下拉选择指数的变化)我想运行一个又一个jQuery函数...这里是我的控制器..从控制器调用JQuery函数

public ActionResult PopulateTest(string Id) 
    { 
     // Here i want to call the JQuery function 
     return PartialView("Details"); 
    } 

和我的jQuery函数...

$(function() { 
    var a = document.getElementById("HidStatus").value; 
    var b = parseInt(a); 
    $("#progressbar").progressbar({ 
     value: b, 
     max: 100 
    }); 
}); 

回答

1

我认为这可能是有益的you..just试试这个...

public ActionResult PopulateTest(string Id) 
{ 
    // Here i want to call the JQuery function 
    page << "foo()" // call your function here after "<<" 
    or you can use call method 
    page.call:foo(); 
    return PartialView("Details"); 
} 

这里是调用方法的参考call

+0

非常感谢... – RobinHood 2011-01-21 07:41:02

相关问题