JavaScriptÊ÷״Ŀ¼ÎÊÌâ ÇóÖú
/*
* list[id] ÊDZ£´æÿ¸ö½ÚµãÐÅÏ¢µÄÊý×é
* 2010-4-8
*/
var list = [];
var tree = function(objName) {
this.title = objName;
this.liNode = [];
this.ulNode = [];
this.str = document.createElement("div");
this.str.innerHTML = this.title;
//½«¸÷¸öͼƬµÄ·¾¶·â×°³Éjson¸ñʽ
this.imgs = {
folderClose:"img/folderclose.gif",
folderOpen:"img/folderopen.gif",
rootFolder:"img/imgfolder.gif",
line:"img/line.gif",
join:"img/join.gif",
joinButtom:"img/joinbottom.gif",
emty:"img/empty.gif",
noLine_minus:"img/nolines_minus.gif",
noLine_plus:"img/nolines_plus.gif",
plus:"img/plus.gif",
plusBottom:"img/plusbottom.gif",
line:"img/line.gif",
joinButtom:"img/joinbottom.gif",
page:"img/page.gif"
};
};
//½ÚµãID£¬¸¸½ÚµãID£¬½ÚµãÃû×Ö£¬Á´½Ó£¬Ä¿±ê --->½ÚµãÐÅÏ¢
tree.prototype.node = function(id,parentId,nodeName,url,target) {
this.id = id;
this.parentId = parentId;
this.nodeName = nodeName;
this.url = (url==null?"javascript:void(0)":url);
this.target = (target==null?"":target);
this.idLength = id.length; //IDµÄ³¤¶È
this.hasChild = false; //ÊÇ·ñÓÐ×Ó½Úµã
this.hasparent = fals
Ïà¹ØÎÊ´ð£º
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
²úÆ·µÄÅäÖÃÒ³Ãæ¹²ÓÃÒ»¸öÓÃJavaScriptµÄdTreeʵÏÖµÄÊ÷Ðνṹ£¬ÏÔʾµÄʱºò£¬Ê÷Ðνṹ¿¿ÔÚÒ³ÃæµÄ×î×ó±ß£¬¸úÎÒµÄÅäÖÃÒ³ÃæÖмä¸ôÁËÒ»´ó¿é£¬ÏÖÔÚÏë°ÑÊ÷ÐÎĿ¼¾ÓÖУ¬½ô¿¿ÔÚÅäÖÃÄÚÈÝÅԱߣ¬ÈçºÎ¿ØÖÆÊ÷ÐÎĿ¼µÄλÖã¬ÒÔ¼°¿É²»¿ ......
ÇóÒ»¸öjavascript½Å±¾..
µ±µã»÷Õâ¸ö<a>Ìí¼Ó¸½½ü</a>Á´½Óʱ¾Í»áÌí¼Ó¶àÒ»ÐÐÉÏ´«¿òºÍ°´Å¥,ºÍ×îºóÒ»¸öÅԱ߻áÏÔʾ"È¡Ïû"µÄÁ´½Ó,µã»÷Õâ¸öÈ¡Ïû¾Í»áÈ¥µô×îºóÒ»ÐÐ,Ò»¸öÕâ¸ö½Å±¾Ôõôд?Íò·Öлл..
Ò ......
JScript code:
function submitForm() {
var err = false;
var submited = false;
if (!submited) {
if (!checkItem("txtUserName")) {
......
×î½üÅöµ½Á˸öÎÊÌâûÓнâ¾ö£¬Ï£Íû¸÷λ¸çÃǸø¸öÒâ¼û»òÊÇÌáÒé¡£
ÏîÄ¿ÓиöÐèÇó£ºÔÚǰ̨½«Óû§Ãû¼°ÃÜÂëÐÅÏ¢¼ÓÃÜ£¬Ç°Ì¨Ê¹ÓõÄÊÇjsp,ÔÚºǫ́ÐèÒª½«Óû§Ãû¼°ÃÜÂëÐÅÏ¢½øÐнâÃÜ£¬ºǫ́ÓõÄÊÇJava servlet¡£ÎÒ³õ²½ÊÇÏëÓÃrsa·Ç¶Ô³ ......