1、在后台中拼接字符串

string script = "function convert(v) {if (v == '1') {return '"+GetResource("Yes")+"';}if (v == '0') {return '"+ GetResource("No"+"';}}";

 

 

2、调用方法,输出到前台,此处不能用response.write

 

Coolite.Ext.Web.ScriptManager.GetInstance(this.Page).AddScript(script);
//coolite方法
ClientScript.RegisterStartupScript(this.GetType(), "myJs", script, true);//asp方法

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-08-27
  • 2021-08-21
  • 2021-08-14
猜你喜欢
  • 2021-06-08
  • 2022-02-27
  • 2022-12-23
  • 2021-06-26
  • 2021-06-19
  • 2022-12-23
相关资源
相似解决方案