首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JS页面跳转解决方法

2013-12-26 
JS页面跳转 if ($(#pro).attr(checked)) {$.ajax({type: get,url: ../DB.ashx,data: { name: id

JS页面跳转
 if ($("#pro").attr("checked")) {
              $.ajax(
          {
              type: "get",
              url: "../DB.ashx",
              data: { "name": id, "pwd1": pwd },
              datatype: "text",
              success: function (data) {
                  if (data == "yes") {
                      $.cookie("NetShop_userid", id, { expires: 15, path: '/' });
                      alert($.cookie("NetShop_userid"));
                      window.location.herf = "../Main.aspx"; //这个不能跳转

                  }
                  if (data == "no")
                      alert("用户或者密码不对!");
              },
              error: function () {
                  alert("error");
              }
          });

//页面地址应该没有错 没有反映  怎么回事

热点排行