¹ØÓÚÔÚJSPÖÐscriptµÄÒýÓÃ
ÏÂÃæcategoryTreeCont.jsp ´úÂë
----------------------------------------
Java code:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script language="javascript" src="../javascript/TV20.js"></script>
ÕâÊDZ»ÒýÈëÒ³ÃæµÄÎÄ×Ö
<script language="javascript">
<!--
addNode(-1,0,"hehe","../images/top.gif"); //Ìí¼ÓÊ÷½Úµã
addNode(0,1,"haha","../images/top.gif");
addNode(0,2,"haha","../images/top.gif");
addNode(1,3,"haha","../images/top.gif");
addNode(1,4,"haha","../images/top.gif");
addNode(2,5,"haha","../images/top.gif");
addNode(2,6,"haha","../images/top.gif");
showTV();
-->
</script>
-----------------------------------
ÎÒÔÚcategorySetTree.jspÖо²Ì¬°üº¬
Java code:
ÏÂÃ潫ÒýÈëÒ³Ãæ
[color=#FF0000]<%@ include file="categoryTreeCont.jsp" %>[/color]
<H3>Àà±ðÁбí</H3>
<DIV class=Tip_Buy>
<TABLE
Ïà¹ØÎÊ´ð£º
ÎÒÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ã滹¿ÉÒÔÈ¡³öÖµÀ´.
µ«ÊÇһˢÐÂ,»òÕß´ò¿ªÐµÄÒ³Ãæ¾ÍÈ¡²»³öÖµÀ´ÁË.
Ææ¹ÖµÄÊÇ,ÎÒ²âÊÔÁíÒ»¸ö³ÌÐòʱºò
ÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ãæ¿ÉÒÔÈ¡³öÖµÀ´,ˢлò´ò¿ªÐÂÒ³ÃæÖµÄÜÈ¡³öÀ´ÁË.
......
¾ßÌå¾ÍÊÇ ÎÒÏëÓÃjsÈ¡µÃsessionÖеĶÔÏóÊý¾Ý·ÅÈëjsÖзâÆðÀ´
²»ÖªµÀ Äܲ»ÄÜʵÏÖ Ï£Íû¸÷λ¸ßÊÖÖ¸µãһϣ¡£¡ ²»Éõ¸Ð¼¤£¡£¡
ͨ¹ýjspÊä³öµ½Ò³ÃæÉÏ£¬ÓÃÒ ......
Java code:
if(request.getAttribute("top")==null){
request.setAttribute("top","1");
}
String topS=(String)request.getAttribute("top");
top=Integer.pa ......
ÐÂÊÖ£¬¸Õ½Ó´¥xml,ÏÖÔÚÓиöÎÊÌâÐèÒª´ó¼Ò°ïæ~~
ÏîÄ¿ÒªÇóÐèÒªÐ޸ķþÎñÆ÷ÉϵÄxmlÎļþ£¬ÏÖÔÚÒѾÔÚjavascriptÖÐÒÔxmlDoc.load()¶Á³öÁËxmlÎļþÖеÄÄÚÈÝ£¬²¢ÔÚÒ³ÃæÉ϶ÔÆäÄÚÈݽøÐÐÁËһЩÐ޸ġ£xmlÎļþÊÇһЩÕâÑùµÄÐÅÏ¢£º ......
ÔÚjspÀïÃ棬Óøöselect¼ÈÄÜÊäÈë×Ô¶¯Æ¥ÅäÓÖÄÜÏÂÀÑ¡ÔñµÄ£¬ÔõôʵÏÖ£¿
²»»á¡£¡£¡£¡£¡£¡£°ï¶¥ ѧϰ¡£¡£
×Ô¶¯Æ¥ÅäʲôÒâ˼£¿¾ßÌåµã
¾ÍÊÇÄãÊäÈëÄÚÈݺ󣬺ÍÄãÄÚÈÝÏàͬѡÏîµÄ¶¼ÁгöÀ´
ÄãselectÊÇÏÂÀ¿ò¡£¡£ ......