日期:2014-05-20  浏览次数:20707 次

autocomplete 联动问题
$().ready(function() {

  function formatItem(row) {
  return row[0] + " (<strong>id: " + row[1] + "</strong>)";
  }
  function formatResult(row) {
  return row[0].replace(/(<.+?>)/gi, '');
  }  
 $("#txtproductLine").autocomplete("SoftSerach.aspx?t=searchProductLine");


  $("#txtProduct").autocomplete('SoftSerach.aspx', {
  width: 300,
  multiple: true,
  //mustMatch: true,
  //dataType: "json", 
  formatItem: formatItem,
  formatResult: formatResult,
  extraParams: { v: 'Product', tz: $('#txtproductLine').val(),t: "ProductLine" }

  });

}
这是我刚开始注册的两个事件,我想把第二个联动的参数用url传过去然后去做联动
但现在 $('#txtproductLine').val()总是空,我觉得是在ready()的时候他就注册在缓存中,不能改变其参数值了,谁有好的办法谢了 ~

------解决方案--------------------

------解决方案--------------------
.net有这个控件的