日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

JavaScript遞歸

系統(tǒng) 3090 0

Server Side JavaScript with ASP

code


/**/ /* *
*ClassNavigator
*@authorKimSoft
*@versionbuild2006-07-0917:46
*@copyright2006KimSoftAllRightsReserved.
*/

function Navigator(boardId) ... {
this ._boardId = boardId;
this ._db = $singleton( function () ... { return new DB();} )();
this ._nodes = [];
}

/**/ /* *
*@paramboardIdasboardid
*@exceptionthrowitwhereexcutedbquery
*/

Navigator.prototype.getNodes
= function (boardId) ... {
var sql = " selectid,parentId,textfromboardwhereid=? " ;
var parentId,text;
try ... {
var rst = this ._db.query(sql,boardId);
if ( ! rst.eof) ... {
parentId
= parseInt(rst.fields( " parentId " ).value);
this ._nodes[ this ._nodes.length] = $empty(rst.fields( " text " ).value);
// this._nodes[this._nodes.length]=$empty(rst.fields("text").value).link("post.asp?act=list&boardId="+boardId);
this .getNodes(parentId);
}

rst.close();
rst
= null ;
}

catch (e) ... {
if ($debug.flag == true ) ... {
throw (e);
}

this ._nodes = [];
}

}
;
/**/ /* *
*@seperatordefaultas"->"
*@returnstring
*/

Navigator.prototype.toString
= function (seperator) ... {
this .getNodes( this ._boardId);
this ._db = null ;
delete this ._db;
return this ._nodes.reverse().join(seperator || " -> " );
}
;

// Response.Write(newNavigator(145).toString());//fortest



JavaScript遞歸


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 北海市| 昌邑市| 尉犁县| 肇州县| 武强县| 仲巴县| 图木舒克市| 沽源县| 文成县| 固原市| 华蓥市| 延津县| 汶上县| 兴城市| 柞水县| 嫩江县| 富宁县| 登封市| 肇庆市| 汽车| 盐山县| 英超| 霍州市| 勃利县| 博客| 子长县| 剑川县| 铜梁县| 定边县| 孟连| 沧州市| 和静县| 大英县| 盈江县| 汤阴县| 无为县| 桦南县| 武宣县| 山丹县| 栾川县| 枣庄市|