Noobie通过Ajax autosuggest表单混淆了他的方式:
我已经完成了大部分工作,但需要稍微分解一下,所以我可以理解jQuery是如何引用的.编辑:这是我的工作代码,谢谢你们.关于ajaxdiv延迟的一些问题,没有闲逛,但我正在努力;)
function jQajax(ipfield,ajd,dbtable,company,select,element){
if (!ipfield || !ajd || !dbtable || !company || !select || !element){alert("Parameters not sent to ajax handler correctly; Input to act on, Ajax Div, Database table to check, Company (database name), Field to select, Element Id. "); return false;}
actobj="#"+ipfield;// set the active object for jQuery
ajdiv="#"+ajd; //set the ajax responding div
listindex=-1; //clear the notion of which item is selected
scriptgo=1; // slowdown for key javascript
leftpos = findPos($(actobj));
var width = …Run Code Online (Sandbox Code Playgroud)