<제목>제목>
함수 ACClient( queryurl, width, objInput, objLable )
{
this.xmldom = getXmlhttp();
this.queryurl = queryurl;
this.prolist = new Array();
this.divwidth = 너비;
this.objInput = objInput;
this.getEligible = function(ac) {
var Eligible = new Array();
if (ac.inputText.length < 1) {
document.getElementById(objInput.name).value = "";
document.getElementById(objLable.name).value = "";
반품 가능;
}
var strURL = this.queryurl escape(ac.inputText) "&rand=" Math.random();
this.xmldom.open("GET", strURL, false);
시도해 보세요 {
this.xmldom.send();
}
catch (e) {
return;
}
this.prolist = this.xmldom.responseXML.documentElement.selectNodes("/duxion/object");
if (0 == this.prolist.length) {
반품 가능;
}
for (var i = 0; i < this.prolist.length; i ) {
if (i > 15)
break;
var node = this.prolist.item(i);
적격[eligible.length] = node.getAttribute("fullcontent");
}
ac.div.style.width = this.divwidth;
반품 가능;
};
this.useSuggestion = function( sel )
{
if( sel>=0 )
{
var node = this.prolist.item(sel);
if(typeof(node.getAttribute( "값" )) != "정의되지 않음")
document.getElementById(objInput.name).value = node.getAttribute( "value" );
else
document.getElementById(objInput.name).value = "";
if(typeof(node.getAttribute( "content" )) != "undefine")
document.getElementById(objLable.name).value = node.getAttribute( "content" );
else
document.getElementById(objLable.name).value = "";
if (this.objInput.name == "hidfreq_code") {
document.getElementById("txtfreq_name").value = node.getAttribute("이름");
document.getElementById("hidfreq_code").value = node.getAttribute("Code");
}
}
};
이것을 돌려주세요;
}
<본문>