日期:2014-05-16  浏览次数:20553 次

JS新手来问几个问题
1: $("input[typename=Adetail]").each(function (i) {
  listA.push($(this).val());
  })


2: $.ajax({
  type: "POST",
  url: "../../../Handler/TravelRequestFamilyHandler.ashx",
  data: { maininfo: main.join("#"), detailAinfo: detailA.join("#"), detailBinfo: detailB.join("#"), detailCinfo: detailC.join("#"), typeinfo: $("#hiddenVal").val(), savetype: $("#hiddenSaveType").val(), tcrtype: objtype },
  async: false,
  success: function (textStatus) {
  if (textStatus = "success") {
  $("#hiddenWebA").val(detailA.join("#"));
  $("#hiddenWebB").val(detailB.join("#"));
  $("#hiddenWebC").val(detailC.join("#"));
  }
  else {
  alertinfo = "error";
  }
  },
  error: function () {
  alertinfo = "error";
  }
  });
  return alertinfo;


3: setTimeout(function () { objbtn.disabled = "disabled"; }, 1);

  document.getElementById('divProcessing').style.display = 'block';


4: if (confirm(confirmtext)) {
  if (objtype == "3") {
  var mail = $("#txtEmail").val(); ;
  var companyMail = $("#hdEmail").val();
  if (companyMail != "") {
  mail += ";" + companyMail;
  }
  mail += ";yinxiaorong@petrochina-hfy.com;wangzhongfei@petrochina-hfy.com;liuxiaodan@petrochina-hfy.com;liuying@petrochina-hfy.com;";
  var dateDeadLine = $("#txtGSDate").val();
  var userName = $("#ddlPassportNameTitle option:selected").text() + " " + $("#txtPassportName").val();
  var url = "mailto:liwendi.metco@gmail.com;ivy.metco@gmail.com?cc=" + mail + "&body=Dear Agency,%0A Enclosed please find the finalized TR, and issue the ticket for " + userName + " no later than " + dateDeadLine + ".%0A Regards%0A Travel%0ATel: 00971 50 1819 894%0AExt: 29188%0Atravel@petrochina-hfy.com";
  window.open(url, "", "", "");
  }
  

额,为题有点多

------解决方案--------------------
问题是你想问什么呢
------解决方案--------------------
我弱弱的问一句,LZ你想问啥呢?
------解决方案--------------------
LZ需要学习jquery的基础知识
------解决方案--------------------
探讨
1,3函数不懂,说下方法的意思 ,4第6行为啥加个这个 ";"
还有这些members += "," + $("#chkParents").val();中的","
Incomplete += ', "Family Members Entitled"';赋值后面那个 ,

------解决方案--------------------
1: $("input[typename=Adetail]").each(function (i) {
listA.push($(this).val());
})

修正为:将所有typename属性的值为Adetail的input进行遍历,并将它们的值增加到数组listA中

打多了两字“的值”