好想說,為什么 清空節(jié)點(diǎn)。不用元素 .innerHtml="";為何還要去循環(huán)。
2016-11-06
謝謝老師!老師講的很不錯(cuò)。
花了3個(gè)半小時(shí),終于完成了,哈哈哈!
對(duì)ajax異步發(fā)送數(shù)據(jù),有所理解。
花了3個(gè)半小時(shí),終于完成了,哈哈哈!
對(duì)ajax異步發(fā)送數(shù)據(jù),有所理解。
2016-11-06
如果你非要點(diǎn)擊時(shí)添加上去,就這樣把:
td.onmousedown = function(){
//當(dāng)鼠標(biāo)點(diǎn)擊一個(gè)關(guān)聯(lián)數(shù)據(jù)時(shí),自動(dòng)在輸入框添加數(shù)據(jù)
document.getElementById("keyword").value =this.innerText;
};
td.onmousedown = function(){
//當(dāng)鼠標(biāo)點(diǎn)擊一個(gè)關(guān)聯(lián)數(shù)據(jù)時(shí),自動(dòng)在輸入框添加數(shù)據(jù)
document.getElementById("keyword").value =this.innerText;
};
2016-11-05
還有一個(gè)鼠標(biāo)放到對(duì)應(yīng)的td上就把對(duì)應(yīng)的值加到input里面的方法如下:
td.onmouseover = function(){
this.className = 'mouseOver';
if(td.innerText != null)
document.getElementById("keyword").value =this.innerText;
}
td.onmouseover = function(){
this.className = 'mouseOver';
if(td.innerText != null)
document.getElementById("keyword").value =this.innerText;
}
2016-11-05
少了一個(gè)方法
td.onclick=function(){
//當(dāng)用鼠標(biāo)點(diǎn)擊一個(gè)關(guān)聯(lián)的數(shù)據(jù)時(shí),關(guān)聯(lián)數(shù)據(jù)自動(dòng)設(shè)置為輸入框中的數(shù)據(jù)
};
td.onclick=function(){
//當(dāng)用鼠標(biāo)點(diǎn)擊一個(gè)關(guān)聯(lián)的數(shù)據(jù)時(shí),關(guān)聯(lián)數(shù)據(jù)自動(dòng)設(shè)置為輸入框中的數(shù)據(jù)
};
2016-11-04
有一個(gè)功能沒有實(shí)現(xiàn),點(diǎn)擊下面的提示列表,輸入框的值就會(huì)成為列表中的值。
2016-11-02