【发布时间】:2010-03-29 12:20:28
【问题描述】:
我正在开发一项自动完成功能。但我在那里面临一个问题...
当我点击建议框时,其中一个结果将不会进入建议 html 框...
function handleOnMouseOver(oTr)
{
deselectAll();
oTr.className ="highlightrow";
position = oTr.id.substring(2, oTr.id.length);
updateKeywordValue(position);
}
你能告诉解决办法吗
谢谢
函数 updateKeywordValue(oTr) {
var oKeyword = document.getElementById("keyword");
var strKeyword="";
var crtLink = document.getElementById("a" +oTr.id.substring(2,oTr.id.length)).toString();
crtLink = crtLink.replace("-", "_");
crtLink = crtLink.substring(0, crtLink.length);
oKeyword.value=unescape(crtLink.substring(googleurl.length, crtLink.length));
strKeyword=oKeyword.value.toString();
如果 (oTr.id.substring(2,oTr.id.length)==0) {
oKeyword.value=strKeyword.substring(3,strKeyword.length);
}
selectedKeyword=oKeyword.value;
}
【问题讨论】: