技术开发 频道

详解如何实现最基本的AJAX框架

  4.页面中添加如下脚本:

  var assemblyName = document.getElementById("AssemblyName");
  
var argus = new Array();
  argus.push(
"100");
  argus.push(
"200");
  CallMethod(assemblyName,
"Add",argus)

  总结 AJAX并不是一种新的技术,它只是一些已有技术的有机结合,我们可以将AJAX简单的理解为:AjAx是对JavaScript调用XmlHttp的封装,它改变的是代码书写方式。

  附 Encode 与 Dencode实现:

public static string Encode(string value)
  {
  
byte[] bytes = ASCIIEncoding.ASCII.GetBytes(value);
  
return Convert.ToBase64String(bytes);
  }
  public static string Dencode(string value)
  {
  
byte[] bytes = Convert.FromBase64String(value);
  
return ASCIIEncoding.ASCII.GetString(bytes);
  }

  

0
相关文章