javascript2.txt
来自「征服AJAX+LUCENE构建搜索引擎的源码」· 文本 代码 · 共 61 行
TXT
61 行
function parseMessage() {
var xmlDoc = req.responseXML.documentElement;
var xSel_0 = xmlDoc.getElementsByTagName('select')[0];
var xValue_0 = xSel_0.childNodes[0].firstChild.nodeValue;
var xText_0 = xSel_0.childNodes[1].firstChild.nodeValue;
var xSel_1 = xmlDoc.getElementsByTagName('select')[1];
var xValue_1 = xSel_1.childNodes[0].firstChild.nodeValue;
var xText_1 = xSel_1.childNodes[1].firstChild.nodeValue;
var xSel_2 = xmlDoc.getElementsByTagName('select')[2];
var xValue_2 = xSel_2.childNodes[0].firstChild.nodeValue;
var xText_2 = xSel_2.childNodes[1].firstChild.nodeValue;
var xSel_3 = xmlDoc.getElementsByTagName('select')[3];
var xValue_3 = xSel_0.childNodes[0].firstChild.nodeValue;
var xText_3 = xSel_0.childNodes[1].firstChild.nodeValue;
var option_0 = new Option(xText_0,xValue_0);
var option_1 = new Option(xText_1,xValue_1);
var option_2 = new Option(xText_2,xValue_2);
var option_3 = new Option(xText_3,xValue_3);
var select_root = document.getElementById('skill');
select_root.options.length=0;
try
{
select_root.add(option_0);
select_root.add(option_1);
select_root.add(option_2);
select_root.add(option_3);
}
catch(e)
{
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?