jQuery 随笔

Posted on 2010-07-21 17:54  pumeifen  阅读(189)  评论(0编辑  收藏  举报

最近几天在学习jQuery ...关于前台调用 [webMethod]方法  $.ajax({})方法使用。

 $.ajax({
                        type: "POST",
                        ontentType: "application/json; charset=utf-8",  //注意这一行一定要写。否则报错。。
                        url: "HHTSConfiguration.aspx/ValidateCommonScreen",// 页面/方法
                        data: "{}",
                        dataType: "text",
                        success: function(result) {
                            if (result.indexOf("true") >= 0) {
                                ShowConfigurationWindow();
                            }
                            else {
                                alert("<%=strCommonScreenParam %>");
                                return;
                            }
                        }
                    });