¹ØÓÚÔÚ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
Ïà¹ØÎÊ´ð£º
<%@ page contentType = "text/html;charset =gb2312"%>
<%!
public String codeToString(String str)
{
String s =str;
&nbs ......
Ò»¸ö¾²Ì¬µÄhtmlÒ³Ã棬ÃÀ»¯£¬½çÃæ²¼¾ÖÒѾ´¦ÀíºÃÁË £¬ÔÚ±àд³ÌÐòµÄʱºòÐèÒªÔÚת»¯³ÉJSPÒ³Ã棬
ËùÒÔн¨Ò»¸öJSPÒ³Ã棬½²ÔÀ´µÄ´úÂ뿽±´µ½ÀïÃæÈ¥£¬½á¹û²¼¾Ö±äÁË£¿
²»´æÔÚ·¾¶ÎÊÌâ!
ûÈË? Õæʧ°Ü!
......
°üÀ¨²ÎÊý
String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"; ......
ÓÉÓÚ Javascript ²»ÄÜ·ÃÎʱ¾µØÎļþ£¬ÏëÓÃJsp¶ÁÈ¡±¾µØÎļþ£¬È»ºó½«ÎļþÄÚÈÝ´«µ½·þÎñÆ÷ºǫ́½øÐд¦Àí£¬ÔõôʵÏÖѽ£¡
ÕâÑùԽȨÁË¡£»òÕß²ÉÓøßÊÚȨµÄAPPLETÀ´×ö£¬ÕâÑùÔÚʹÓÃʱÐèÒªÓû§ÏÂÔØÖ¤Êé²¢ÇÒÊÚȨ£¡
¹Ø× ......
ÕâÊÇÎÒ´ÓIT¹«Ë¾ÃæÊÔÊÖ²áÍøÕ¾ÉÏ¿´µ½µÄÒ»¸öÃæÊÔÌ⣬ËûÃÇÌṩµÄ´ð°¸ÊÇ£º
µ±¿Í»§¶ËÏòÒ»¸öJSPÒ³Ãæ·¢³öÇëÇóʱ£¬Web Container½«JSPת»¯³ÉServletµÄÔ´´úÂë(Ö»ÔÚµÚÒ»´ÎÇëÇóʱ)£¬È»ºó±àÒëת»¯ºóµÄServlet²¢¼ÓÔص½ÄÚ´æÖ ......