(function ($) { // 定义 $.fn.lookup = function (_paras) { var thisId = this.attr("id"); var obj = $("#" + thisId); var thisT = null; obj.attr("autocomplete", "off"); obj.bind("keyup", function () { if (thisT != null) { clearTimeout(thisT); $(".bslookupdiv").remove(); } if ($(this).attr("readonly") == "readonly") { return; } $(".bslookupdiv").remove(); if ($(this).val() == "") { //$("#" + thisId + "_v").val(""); return; } //$(this).attr("readonly", "readonly"); var tempP = ""; if (_paras.lname != null) { tempP = "&" + _paras.lname + "=" + $(this).val(); } else { tempP = "&" + thisId + "=" + $(this).val(); } thisT = setTimeout(doRefresh( null, _paras.bsid, _paras.opname, _paras.paras + tempP, function (_data) { var obj = $("#" + thisId); if (_data != null && _data.r == 0) { obj.focus(); // 加载下拉框 var _html = "