当前位置导航:炫浪网>>网络学院>>网页制作>>ASP.NET教程

C# asp.net 后台script

  public void showScript(string pMessage)

  {

  this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language = javascript>alert('" + pMessage + "')</script>");

  //脚本

  Type cstype = this.GetType();

  ClientScriptManager cs = this.ClientScript;

  StringBuilder cstext2 = new StringBuilder();

  cstext2.Append("<script type=\"text/javascript\"> function DoClick() {");

  cstext2.Append("document.getElementById('Message').style.width=60;} </");

  cstext2.Append("script>");

  cs.RegisterClientScriptBlock(cstype, "ButtonClickScript", cstext2.ToString(), false);

  }

相关内容
赞助商链接