bug找到了

原来不是二维数组的问题,而是我在循环变量上犯了一点小错误

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<head> 
<title>select</title> 
<script type="text/javascript" src="/js/dojo/dojo.js"></script> 
<script type="text/javascript"> 
dojo.require("dojo.event.*"); 
// sophisticated AOP event handling 

dojo.require("dojo.io.*"); 
// for Ajax requests 

function init(e){ 
    loadSelectionValues("/cgi-bin/privmgr/mysql_tableList.cgi","mysql_tableList"); 
} 
dojo.addOnLoad(init); 

function loadSelectionValues(dateUrl,selectName){ 

dojo.io.bind({ 
    url: dateUrl, 
    load: function (type,value,evt) { 
        var i; 
        var selectName0=document.getElementById(selectName); 
        for(i=0;i!=value.length-1;++i){ 
            selectName0.options[i+1] = new Option(value[i][0]); 
            selectName0.options[i+1].value = value[i][1]; 
        } 
    }, 
    mimetype: "text/json", 
    encoding: "GB2312" 
    }); 
} 

function test(obj){ 
  alert(obj.value); 
} 

</script> 
</head> 
<body> 
<select name="mysql_tableList" id="mysql_tableList" onChange="test(this)" value="" > 
<option value="">(空)</option> 
</select> 
</body> 
</html>

此博客中的热门博文

少写代码,多读别人写的代码

在windows下使用llvm+clang

tensorflow distributed runtime初窥