`
java-mans
  • 浏览: 11415736 次
文章分类
社区版块
存档分类
最新评论

后台调用前台js传参

 
阅读更多

stringaccount="a";

stringb="b";

ScriptManager.RegisterStartupScript(this, this.GetType(), "", "Call('"+account+"','"+b+"');", true);

Call是前台的js,如果要传参,记得一定得'"+a+"'这种字符的。如果"+a+"就出错了。因为javascript没有int类型的,有var类型的。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics