Ïà¶Ô·¾¶/¾ø¶Ô·¾¶(¾ÙÀýÒ»html)
http://localhost:8080/tj16/
"/"´ú±í¸ùĿ¼£¬"./" ´ú±íµ±Ç°Ä¿Â¼£¬"../"´ú±íÉϼ¶Ä¿Â¼¡£
·þÎñÆ÷¶ËµÄÏà¶ÔµØÖ·Ö¸µÄÊÇÏà¶ÔÓÚÄãµÄwebÓ¦ÓõĵØÖ·£¬ÊÇÔÚ·þÎñÆ÷¶Ë½âÎöµÄ¡£(http://localhost:8080/tj16/)
htmlÒ³ÃæÖеÄÏà¶ÔµØÖ·¶¼ÊÇÏà¶ÔÓÚ·þÎñÆ÷¸ùĿ¼£¬Êǿͻ§¶Ëä¯ÀÀÆ÷½âÎöµÄ¡£(http://localhost:8080/)
webapp tj16
i:/test/tj16/a.jsp
i:/test/tj16/aa/aa.jsp
i:/test/tj16/aa/bb.jsp
i:/test/tj16/aa/cc/c.jsp
µØÖ·À¸ÖÐÊäÈëµØÖ·£º[http://localhost:8080/tj16/aa/aa.jsp]
aa.jspÖÐÄÚÈÝ
(1)<a href="../a.jsp">test1</a> || Á¬½Óµ½[http://localhost:8080/tj16/a.jsp]
(2)<a href="/tj16/a.jsp">test2</a> || Á¬½Óµ½[http://localhost:8080/tj16/a.jsp]
(3)<a href="/a.jsp">test3</a> || Á¬½Óµ½[http://localhost:8080/a.jsp]
(4)<a href="./bb.jsp">test4</a> || Á¬½Óµ½[http://localhost:8080/aa/bb.jsp]
(5)<a href="bb.jsp">test5</a> || Á¬½Óµ½[http://localhost:8080/aa/bb.jsp]
(6)<a href="cc/c.jsp">test6</a> || Á¬½Óµ½[http://localhost:8080/aa/cc/c.jsp]
ÉèÖÃ<form>±êÇ©ÖеÄactionֵΪÉÏÃæµÄhrefÖµ£¬Á½Õߵõ½µÄ½á¹ûÒ»ÖÂ(Ò»Ö£ºµØÖ·À¸ÖеĽá¹ûºÍÒ³ÃæÏÔʾµÄ½á¹û)¡£
[for example:]
<form action="/tj16/a.jsp">
<input type="submit">
</form>
·¾¶½âÎö£º[http://localhost:8080/tj16/aa/aa.jsp]
(a) "/" ---->[http://localhost:8080/] (¸ùĿ¼)
(b) "./" --->[http://localhost:8080/tj16/aa/] (µ±Ç°Ä¿Â¼)
(c) "../"--->[http://localhost:8080/tj16/] (ÉÏÒ»¼¶Ä¿Â¼)
×¢£ºµ±Ç°Ä¿Â¼¿ÉÒÔÊ¡ÂÔ²»Ð´£¬Èçaa.jspÖеÄ(5)ºÍ(4)½á¹ûÊÇÒ»ÑùµÄ
´Ó½á¹û¿ÉÒÔ¿´³ö£¬ÕâÈýÕß"/",
Ïà¹ØÎĵµ£º
metaÊÇÓÃÀ´ÔÚHTMLÎĵµÖÐÄ£ÄâHTTPÐÒéµÄÏìӦͷ±¨ÎÄ¡£meta
±êÇ©ÓÃÓÚÍøÒ³µÄ<head>Óë</head>ÖУ¬meta ±êÇ©µÄÓô¦ºÜ¶à¡£meta
µÄÊôÐÔÓÐÁ½ÖÖ£ºnameºÍhttp-equiv¡£nameÊôÐÔÖ÷ÒªÓÃÓÚÃèÊöÍøÒ³£¬¶ÔÓ¦ÓÚcontent£¨ÍøÒ³ÄÚÈÝ£©£¬ÒÔ±ãÓÚËÑË÷ÒýÇæ»úÆ÷È˲éÕÒ¡¢·ÖÀࣨĿ
ǰ¼¸ºõËùÓеÄËÑË÷ÒýÇæ¶¼Ê¹ÓÃÍøÉÏ»úÆ÷ÈË×Ô¶¯²éÕ ......
<input type="text" value="" maxlength="18"
name="goods.goodsName" value="${goods.goodsName}"
style="width: 99%;" id="goodsName">
value ÊôÐÔ ÖØ¸´ £¬ µ¼Ö嵀 input Ç°Ì¨Ò³Ãæ Öµ Ϊ ""
ÒÔµÚÒ»¸öÊôÐÔµÄÖµÎª× ......
_blank : ÔÚÒ»¸öеģ¬Ã»ÓÐÃüÃûµÄ´°¿ÚÖдò¿ªÖ¸¶¨Îĵµ
_self : ÔÚµ±Ç°´°¿ÚÖдò¿ªÎĵµ
_parent : ÔÚ¸¸´°¿ÚÖдò¿ªÎĵµ£¬µ±Ã»Óи¸´°¿Úʱ£¬_parentÓë_selfÊÇÒ»ÑùµÄ
_top £º ÔÚµ±Ç°´°¿ÚÖдò¿ªÎĵµ£¬²¢ÇÒ´ò¿ªµÄÎ ......
Ê×ÏÈÔÚlayoutÎļþ¼ÐϵÄxmlÖÐ ¼ÓÈëWebView¿Ø¼þ
<WebView
android:id="@+id/wv1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
ÔÙÔÚÖ÷ÎļþÖÐÊäÈëÈçÏ´úÂë
public class TestDemo extends Activity {
/** Called when the activity is first created. */ ......
ÔÚWebÓ¦ÓóÌÐòÌØ±ðÊÇWeb2.0³ÌÐò¿ª·¢ÖУ¬¾³£Òª»ñÈ¡Ò³ÃæÖÐij¸öÔªËØ£¬È»ºó¸üиÃÔªËØµÄÑùʽ¡¢ÄÚÈݵȡ£ÈçºÎ»ñȡҪ¸üеÄÔªËØ£¬ÊÇÊ×ÏÈÒª½â¾öµÄÎÊÌâ¡£ÁîÈËÐÀοµÄÊÇ£¬Ê¹ÓÃJavaScript»ñÈ¡½ÚµãµÄ·½·¨ÓкܶàÖÖ£¬ÕâÀï¼òµ¥×öÒ»ÏÂ×ܽᣨÒÔÏ·½·¨ÔÚIE7ºÍFirefox2.0.0.11²âÊÔͨ¹ý£©¡£
1. ͨ¹ý¶¥²ãdocument½Úµã»ñÈ¡£º
(1)document. ......