您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

传递参数的标准方法(jQuery.ajax)_jquery

2024/3/3 23:11:22发布26次查看
前台 
复制代码 代码如下:
无标题页
点击
接收后台数据
hello
后台 
复制代码 代码如下:
public partial class ajax : system.web.ui.page
{
protected void page_load(object sender, eventargs e)
{
//response.write(hello+request[name]);
hashtable ht = new hashtable();
ht.add(name, request.params[name]);
ht.add(id, request.params[id]);
response.write(createjsonparams(ht));
response.end();
}
private string createjsonparams(hashtable items)
{
string returnstr = ;
foreach (dictionaryentry item in items)
{
returnstr += \ + item.key.tostring() + \:\ + item.value.tostring() + \,;
}
return { + returnstr.substring(0, returnstr.length - 1) + };
}
}
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product