随笔分类 -  Ajax

摘要:UpdatePanel是没有回发事件的所有,无法重新加载javascript和css处理方法 <script type="text/javascript" language="javascript"> Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); functio 阅读全文
posted @ 2012-10-23 14:44 ajunfly 阅读(1381) 评论(0) 推荐(0)
摘要:首先创建一个页面ajaxTest.aspx用来获取服务器时间,前端代码<head runat="server"> <title>无标题页</title> <script type="text/javascript"> var xmlHttp;//定义xmlHttpRequest变量//创建XMLHttpRequest对象 function CreateXmlHttp() { if(window.XMLHttpRequest) { //用户当前所使用的浏览器是IE7以上版本,或非IE浏览器 xmlHttp = 阅读全文
posted @ 2012-08-29 17:50 ajunfly 阅读(2743) 评论(0) 推荐(0)
摘要:ajax代码$.ajax({ type: "post", url: "AjaxHandler.ashx", data: {"value1":'万事如意',"value2":'心想事成',"value3":'牛牛牛'},//参数要对应 success: function(result) { alert(result); } });一般处理程序操作ashx获取参数值 string value1 = context.Request.Form[" 阅读全文
posted @ 2012-05-13 16:08 ajunfly 阅读(11434) 评论(1) 推荐(2)
摘要:webservice 存在新数据时访问数据库,不存在时访问session,减少了对数据库的访问次数 /// <summary> /// 返回开标信息数据集 /// </summary> /// <param name="tenderId"></param> /// <returns></returns> [WebMethod(EnableSession = true)] public List<string> GetInformation(string tenderId) { string 阅读全文
posted @ 2012-03-28 17:32 ajunfly 阅读(203) 评论(0) 推荐(0)
摘要:http://codylindley.com/jqueryselectors/ 阅读全文
posted @ 2012-02-24 15:03 ajunfly 阅读(231) 评论(0) 推荐(0)
摘要:$(function() { $("#Button1").click(function() { //无参数 $.ajax({ type: "post", //访问WebService使用Post方式请求 contentType: "application/json", //WebService 会返回Json类型 url: "WebService.asmx/HelloWorld", //调用WebService的地址和方法名称组合 data: "{}", //这里是要传递的参数,格式为 data 阅读全文
posted @ 2012-02-23 09:47 ajunfly 阅读(245) 评论(0) 推荐(0)