步步為營

          2006年4月8日

          table 與 div的關系

          table的寬度百分比取決于父對象的寬度,父對象常見為div,


          常見錯誤

          <div?style="width:100%">
          ???
          <table?style="width;100%;margin:10px"
          </div
          >
          這種情況下,table 肯定將獲得div的全部寬度,不會因為margin而進行改變。所以要想保持美觀,盡量不要在table上加margin, 正確寫法如下:

          <div?style="width:100%;margin:10px">
          ???
          <table?style="width;100%"
          </div
          >


          小經驗,分享之

          posted @ 2006-04-08 11:42 java門客 閱讀(498) | 評論 (1)編輯 收藏

          2005年10月25日

          Generic Type

          近日,碰到類似于“ ...raw type list..”字樣的提示,研究發現,J2SE 5.0有了一個新的變化,就是generic概念,詳細請看:
          http://java.sun.com/docs/books/tutorial/java/javaOO/gentypes.html

          問題自然就會得到答案。

          提供一例:
          假設你要建立一類Product的arraylist,代碼應為:
          List<Product> result = new ArrayList<Product>();
          result.add(new Product());
          以前的寫法為:
          List result = new ArrayList();
          result.add(new Product());
          其中奧妙看那篇文章吧。:)

          posted @ 2005-10-25 14:22 java門客 閱讀(167) | 評論 (0)編輯 收藏

          2005年10月14日

          UrlRewrite2.5.x 手冊注解

          1、run元素對應的class的方法必須為public

          <run> element
          Allows you to run a method on an object when a rule and it's conditions are matched.

          Attribute Explanation 
          class (default) The class you want to run a method on. Must be a fully qualified name. 
          method (optional, default run) The method you want to run, the method must have the parameters (HttpServletRequest, HttpServletResponse) e.g. run(HttpServletRequest request, HttpServletResponse response) 
          Note, if init(ServletConfig) or destroy() is found they will be run at when creating or destroying an instance.  
          neweachtime (optional, default false) If you want new instance of the class to be created before running each time set to true. 

          When the rule in the following example is matched, WorldServlet.goGet(HttpServletRequest, HttpServletResponse) will be invoked, the request will then be forwarded to /world-presentation.jsp.

              
          <rule>
              
          <from>^/world/[a-z]+/[a-z]+$</from>
              
          <run class="com.blah.web.WorldServlet" method="doGet" />
              
          <to>/world-presentation.jsp</to>
              
          </rule>
          Note, you can specify init-param's the same way you would for a servlet.

              
          <run class="com.blah.web.MyServlet" method="doGet">
              
          <init-param>
              
          <param-name>someParamName</param-name>
              
          <param-value>10</param-value>
              
          </init-param>
              
          </run>

          posted @ 2005-10-14 20:10 java門客 閱讀(271) | 評論 (0)編輯 收藏

          僅列出標題  
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 新源县| 施甸县| 株洲市| 昌都县| 西畴县| 阜新市| 浦北县| 双流县| 玉树县| 辽阳县| 阿荣旗| 闻喜县| 贵南县| 来安县| 常熟市| 板桥市| 东光县| 广安市| 仁化县| 泰州市| 阳高县| 楚雄市| 辉南县| 简阳市| 广平县| 荣成市| 吴桥县| 津市市| 武功县| 准格尔旗| 扶绥县| 隆尧县| 微山县| 双桥区| 阿合奇县| 邢台市| 手游| 崇礼县| 喀什市| 会泽县| 上蔡县|