我正在構建一個ASP.net測驗引擎,並且我在Flash中使用之前的測驗引擎作爲ASP版本的模板。我卡我如何能做到下面的代碼在ASP.netASP.NET將動作腳本代碼轉換爲ASP等效(二維數組)
// array to hold the answers
var arrAnswers:Array = new Array();
// create and array of answers for the given question
arrAnswers[i] = new Array();
// loop through the answers of each question
for (j=0; j<dataXML.question[i].answers.length(); j++)
{
//array of answers for that given question is pulle from XML data
arrAnswers[i][j] = dataXML.question[i].answers[j][email protected]();
// if the given answer is the correct answer then set that value to the arrcorrect
}
任何人都可以對我如何能得到上面的動作腳本代碼在ASP.net幫助?
有沒有更高的循環(i = 0)這個例子中缺少?它看起來像循環了問題,然後回答了每個問題的所有可能答案。我對麼? – used2could 2010-02-23 13:23:26
你有更高的循環...你是正確的代碼循環通過每個問題,然後找到每個問題的每個可能的答案! – c11ada 2010-02-23 13:55:19