为什么jQuery中的这个值会改变?

时间:2018-04-30 00:38:48

标签: javascript jquery

HTML

<button type="button" value="" onclick="getInfo(007267, 10140000000)" class="btn btn-xs btn-primary">INFO</button>

的JavaScript

function getInfo(growerid, plantid) {
  $.ajax({
    type: "POST",
    url: "plantsearch.php",
    data: "op=" + "info" + "&gid=" + growerid + "&pid=" + plantid + "&ml=" + MyLimit + "&mo=" + MyOffset,
    datatype: "text",
    success: function (data, status, xhr) {
      //$("#tbody_info").html(data);
      alert(data);
    },
    error: function (xhr, status, error) {
      alert(status);
    }
  });
}

问题是HTML中的growerid是正确的,即007267,但是,当调用该函数时,growerid的值不是007267而是3767.为什么这会改变?

谢谢, TD

0 个答案:

没有答案