<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    tinguo002

     

    JAVA身份證驗證

    public class IDCard {

          private String _codeError;

          //wi =2(n-1)(mod 11)
          final int[] wi = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1};
          // verify digit
          final int[] vi = {1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2};
          private int[] ai = new int[18];
          private static String[] _areaCode={"11","12","13","14","15","21","22"
              ,"23","31","32","33","34","35","36","37","41","42","43","44"
              ,"45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"};
          private static HashMap<String,Integer> dateMap;
          private static HashMap<String,String> areaCodeMap;
          static{
                dateMap=new HashMap<String,Integer>();
                dateMap.put("01",31);
                dateMap.put("02",null);
                dateMap.put("03",31);
                dateMap.put("04",30);
                dateMap.put("05",31);
                dateMap.put("06",30);
                dateMap.put("07",31);
                dateMap.put("08",31);
                dateMap.put("09",30);
                dateMap.put("10",31);
                dateMap.put("11",30);
                dateMap.put("12",31);
                areaCodeMap=new HashMap<String,String>();
                for(String code:_areaCode){
                      areaCodeMap.put(code,null);
                }
          }

          //驗證身份證位數,15位和18位身份證
          public boolean verifyLength(String code){
                int length=code.length();
                if(length==15 || length==18){
                      return true;
                }else{
                      _codeError="錯誤:輸入的身份證號不是15位和18位的";
                      return false;
                }
          }

          //判斷地區碼
          public boolean verifyAreaCode(String code){
                String areaCode=code.substring(0,2);
    //            Element child=  _areaCodeElement.getChild("_"+areaCode);
                if(areaCodeMap.containsKey(areaCode)){
                      return true;
                }else{
                      _codeError="錯誤:輸入的身份證號的地區碼(1-2位)["+areaCode+"]不符合中國行政區劃分代碼規定(GB/T2260-1999)";
                      return false;
                }
          }

          //判斷月份和日期
          public boolean verifyBirthdayCode(String code){
                //驗證月份
                String month=code.substring(10,12);
                boolean isEighteenCode=(18==code.length());
                if(!dateMap.containsKey(month)){
                      _codeError="錯誤:輸入的身份證號"+(isEighteenCode?"(11-12位)":"(9-10位)")+"不存在["+month+"]月份,不符合要求(GB/T7408)";
                      return false;
                }
                //驗證日期
                String dayCode=code.substring(12,14);
                Integer day=dateMap.get(month);
                String yearCode=code.substring(6,10);
                Integer year=Integer.valueOf(yearCode);

                //非2月的情況
                if(day!=null){
                      if(Integer.valueOf(dayCode)>day || Integer.valueOf(dayCode)<1){
                            _codeError="錯誤:輸入的身份證號"+(isEighteenCode?"(13-14位)":"(11-13位)")+"["+dayCode+"]號不符合小月1-30天大月1-31天的規定(GB/T7408)";
                            return false;
                      }
                }
                //2月的情況
                else{
                      //閏月的情況
                      if((year%4==0&&year%100!=0)||(year%400==0)){
                            if(Integer.valueOf(dayCode)>29 || Integer.valueOf(dayCode)<1){
                                  _codeError="錯誤:輸入的身份證號"+(isEighteenCode?"(13-14位)":"(11-13位)")+"["+dayCode+"]號在"+year+"閏年的情況下未符合1-29號的規定(GB/T7408)";
                                  return false;
                            }
                      }
                      //非閏月的情況
                      else{
                            if (Integer.valueOf(dayCode) > 28 || Integer.valueOf(dayCode) < 1) {
                                  _codeError="錯誤:輸入的身份證號"+(isEighteenCode?"(13-14位)":"(11-13位)")+"["+dayCode+"]號在"+year+"平年的情況下未符合1-28號的規定(GB/T7408)";
                                  return false;
                            }
                      }
                }
                return true;
          }

          //驗證身份除了最后位其他的是否包含字母
          public boolean containsAllNumber(String code) {
                String str="";
                if(code.length()==15){
                      str=code.substring(0,15);
                }else if(code.length()==18){
                      str=code.substring(0,17);
                }
                char[] ch = str.toCharArray();
                for (int i = 0; i < ch.length; i++) {
                      if (! (ch[i] >= '0' && ch[i] <= '9')) {
                            _codeError="錯誤:輸入的身份證號第"+(i+1)+"位包含字母";
                            return false;
                      }
                }
                return true;
          }

          public String getCodeError(){
                return _codeError;
          }

          //驗證身份證
          public boolean verify(String idcard) {
                _codeError="";
                //驗證身份證位數,15位和18位身份證
                if(!verifyLength(idcard)){
                    return false;
                }
                //驗證身份除了最后位其他的是否包含字母
                if(!containsAllNumber(idcard)){
                      return false;
                }

                //如果是15位的就轉成18位的身份證
                String eifhteencard="";
                if (idcard.length() == 15) {
                      eifhteencard = uptoeighteen(idcard);
                }else{
                      eifhteencard=idcard;
                }
                //驗證身份證的地區碼
                if(!verifyAreaCode(eifhteencard)){
                      return false;
                }
                //判斷月份和日期
                if(!verifyBirthdayCode(eifhteencard)){
                      return false;
                }
                //驗證18位校驗碼,校驗碼采用ISO 7064:1983,MOD 11-2 校驗碼系統
                if(!verifyMOD(eifhteencard)){
                      return false;
                }
                return true;
          }

          //驗證18位校驗碼,校驗碼采用ISO 7064:1983,MOD 11-2 校驗碼系統
          public boolean verifyMOD(String code){
                String verify = code.substring(17, 18);
                if("x".equals(verify)){
                      code=code.replaceAll("x","X");
                      verify="X";
                }
                String verifyIndex=getVerify(code);
                if (verify.equals(verifyIndex)) {
                      return true;
                }
    //            int x=17;
    //            if(code.length()==15){
    //                  x=14;
    //            }
                _codeError="錯誤:輸入的身份證號最末尾的數字驗證碼錯誤";
                return false;
          }

          //獲得校驗位
          public String getVerify(String eightcardid) {
                int remaining = 0;

                if (eightcardid.length() == 18) {
                      eightcardid = eightcardid.substring(0, 17);
                }

                if (eightcardid.length() == 17) {
                      int sum = 0;
                      for (int i = 0; i < 17; i++) {
                            String k = eightcardid.substring(i, i + 1);
                            ai[i] = Integer.parseInt(k);
                      }

                      for (int i = 0; i < 17; i++) {
                            sum = sum + wi[i] * ai[i];
                      }
                      remaining = sum % 11;
                }

                return remaining == 2 ? "X" : String.valueOf(vi[remaining]);
          }

          //15位轉18位身份證
          public String uptoeighteen(String fifteencardid) {
                String eightcardid = fifteencardid.substring(0, 6);
                eightcardid = eightcardid + "19";
                eightcardid = eightcardid + fifteencardid.substring(6, 15);
                eightcardid = eightcardid + getVerify(eightcardid);
                return eightcardid;
          }



    調 用 new IDCard().verify(身份證id);
    轉載:http://www.oschina.net/code/snippet_249203_24013

    posted @ 2014-02-27 10:45 一堣而安 閱讀(480) | 評論 (0)編輯 收藏

    java獲取路徑

    String catalinaHome = new File("").getAbsolutePath();


    getAbsolutePath() 得到絕對路徑、全路徑。
    getpath 得到縮寫的路徑,根據當前目錄位置可以縮寫路徑。得到相對路徑
    getCanonicalPath() 得到標準路徑,將統一平臺間的路徑寫法差異。
    package util;

    import java.io.File;

    public class CurrentDirectory {
        
        
    public static void print(Object o) {
            System.out.println(o);
        }


        
    public static void main(String[] args) throws Exception {
            print(Thread.currentThread().getContextClassLoader().getResource(
    ""));
            print(CurrentDirectory.
    class.getClassLoader().getResource(""));
            
    //print(this.getClass().getResource("/").toString().replace("file:/", "")); //在非靜態方法中可以使用
            print(ClassLoader.getSystemResource(""));
            print(CurrentDirectory.
    class.getResource(""));
            print(CurrentDirectory.
    class.getResource("/"));
            print(
    new File("").getAbsolutePath());
            print(System.getProperty(
    "user.dir"));
        }

        
    }


    posted @ 2014-02-24 10:43 一堣而安 閱讀(190) | 評論 (0)編輯 收藏

    jQuery data()

    http://jianfulove.iteye.com/blog/1842254

    posted @ 2014-01-01 19:05 一堣而安 閱讀(166) | 評論 (0)編輯 收藏

    javascript深入學習

    http://www.laruence.com/2009/09/23/1089.html

    posted @ 2014-01-01 16:54 一堣而安 閱讀(181) | 評論 (0)編輯 收藏

    樹形全部展示代碼

    jsp:代碼

    <script type="text/javascript">

      $(function(){
       //alert('${tip}');
       if('${tip}'!=''){
        $('#tip').css('display','inline-block');
       }
      });
     
      var zTreeObj;
      var allSelectedId="";
      var allSelectedName = "";
      var zNodes = ${data};
      var setting = {
       isSimpleData: true,
       treeNodeKey: "id",         //設置節點唯一標識屬性名稱
       treeNodeParentKey: "pId",  //設置節點的父節點唯一標識屬性名稱
       nameCol: "name",           //設置 zTree 顯示節點名稱的屬性名稱,此處默認為Name
       showLine: true,            //在樹型中是否顯示線條樣式
       
       check: {
        enable: true,
        chkStyle: "<%=type%>",
        chkboxType: <%=chkboxType%>,
        radioType: "all"
       },
       callback: {
        onClick: onClick
       },
       data: {
        simpleData: {
         enable: true
        }
       }
      };
       
      $(function(){
       $("#btnClose").bind("click",doClose);
       $("#btnConfirm").bind("click",doConfirm);
       zTreeObj = $("#tree").zTree(setting,zNodes);
      });
      
      //關閉窗口
      function doClose(){
       window.close();
      }
       
      function doConfirm(){
       var checkedNodes = zTreeObj.getCheckedNodes(true);
       alert(checkedNodes);
       for (i=0;i<checkedNodes.length;i++) {
       
        var treeNode = checkedNodes[i];
        alert(treeNode.id);
         if(!treeNode.open){
          allSelectedId += (allSelectedId == "" ? "" : ",") + treeNode.id;
          allSelectedName += (allSelectedName == "" ? "" : ",") + treeNode.name;      
         }
        }
       $('#hiddenId').val(allSelectedId);
       $('#hiddenName').val(allSelectedName);
      }
      
      function showMenu() {
       var deptname = $("#deptname");
       var offset = deptname.offset();
       $("#menu").width(deptname.width())
       .css({left:offset.left + "px", top:offset.top + deptname.outerHeight() + "px"})
       .slideDown("fast");
      }
      
      function hideMenu() {
       $("#menu").fadeOut("fast");
      }
      
      function onClick(e, treeId, treeNode) {
       alert(treeId);
       if(treeNode.checked){
        hideMenu();
       }else{
        zTreeObj.checkNode(treeNode, true, null, true);
       }
       return false;
      }
      
      function onCheck(e, treeId, treeNode){
       alert(treeNode.id);
       allSelectedId += (allSelectedId == "" ? "" : ",") + treeNode.pId+"|"+treeNode.id+"|"+treeNode.name;
      }
     </script>

    java代碼:

    public class CameraTreeAPI {
     private static Logger log = Logger.getLogger(CameraTreeAPI.class);
     
     /**
      *
      * 功能說明:獲取整個ztree攝像頭樹
      * @return  滿足ztree要求的json數據
      * String
      * @author chh
      * @Jun 14, 2012
      */
     public  String getZTree(String systemUnid,String selectUnid){
      selectUnid = ","+StrUtil.formatNull(selectUnid)+",";
      JSONArray array = new JSONArray();
      try{
       List<BusinessCamera> list = new BusinessCameraManager().doFindBySystemUnid(systemUnid);
       
       JSONObject top = new JSONObject();
       top.put("id","0");
       top.put("name","攝像頭列表");
       top.put("open",true);
       array.add(top);
       
       if(list!=null && list.size()>0){    
        for(Object object : list){
         BusinessCamera camera = (BusinessCamera)object;
         JSONObject json = new JSONObject();
         json.put("id",camera.getUnid());
         json.put("name",camera.getName());
         json.put("pId",camera.getPunid());
         json.put("checked", selectUnid.indexOf(camera.getUnid()) >= 0);
         if(hasChildren(list,camera)){
          json.put("open",true);
         }
         array.add(json);
        }
       }
      }catch(Exception e){
       e.printStackTrace();
       log.error(e.getMessage(),e);
      }
      return array.toString();
     }
     
     public boolean hasChildren(List<BusinessCamera> allData,BusinessCamera camera){
      if(allData == null || allData.isEmpty() || camera == null){
       return false;
      }
      for(BusinessCamera unit : allData){
       if(unit.getUnid().equalsIgnoreCase(camera.getUnid())){
        continue;
       }
       if(camera.getUnid().equalsIgnoreCase(unit.getPunid())){
        return true;
       }
      }
      return false;
     }
     
    }


    posted @ 2013-12-30 19:16 一堣而安 閱讀(231) | 評論 (0)編輯 收藏

    oracle導出表結構的幾種方法。

    1.在cmd中輸入 exp username/password@連接串

      回車,在進入如下時,輸入no,就ok了

      導出表數據(yes/no):yes> no

      2.

      進入plsql

      找到table那個大項,點出來,下邊會羅列出許多表

      右鍵點中你所需要的那個表名

      找到DBMS_Metadata

      然后選項里有ddl

      彈出來那個窗口就是你的表結構,拷貝出來直接在另一個庫里執行就可以啦

      -----------------------------補充------------------------

      PLSQL里

      tools下

      export user objects of

      按shift批量選擇表

      執行就行了

      3

      exp/imp工具;

      帶參數:rows=y —— 帶數據導出導入;

      rows=n —— 不帶數據的導出導入,只移植結構

      只導出3張表的結構:

      exp user/pasword@dbServerName owner=user tables=(tb1,tb2,tb3) rows=n file=c:\1.dmp

      連帶數據導出:

      exp user/pasword@dbServerName owner=user tables=(tb1,tb2,tb3) rows=y file=c:\2.dmp

      imp user2/pasword@dbServerName2 fromuser=user touser=user2 file=c:\1.dmp

      或者

      imp user2/pasword@dbServerName2 fromuser=user touser=user2 file=c:\2.dmp

      3

      方法一:

      exp userid=scott/tiger owner=scott

      imp userid=scott/tiger full=y indexfile=scott.sql

      ……

      more scott.sql

      REM   CREATE TABLE "SCOTT"."BONUS" ("ENAME" VARCHAR2(10), "JOB"

      REM   VARCHAR2(9), "SAL" NUMBER, "COMM" NUMBER) PCTFREE 10 PCTUSED 40

      REM   INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST

      REM   GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;

      REM   ... 0 rows

      REM   CREATE TABLE "SCOTT"."DEPT" ("DEPTNO" NUMBER(2, 0), "DNAME"

      REM   VARCHAR2(14), "LOC" VARCHAR2(13)) PCTFREE 10 PCTUSED 40 INITRANS 1

      REM   MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1)

      REM   TABLESPACE "USERS" LOGGING NOCOMPRESS ;

      REM   ... 4 rows

      REM CREATE TABLE "SCOTT"."DUMMY" ("DUMMY" NUMBER) PCTFREE 10 PCTUSED 40

      REM   INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST

      REM   GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;

      REM   ... 1 rows

      REM   CREATE TABLE "SCOTT"."EMP" ("EMPNO" NUMBER(4, 0) NOT NULL ENABLE,

      REM   "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4, 0),

      REM   "HIREDATE" DATE, "SAL" NUMBER(7, 2), "COMM" NUMBER(7, 2), "DEPTNO"

      REM   NUMBER(2, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255

      REM   STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE

      REM   "USERS" LOGGING NOCOMPRESS ;

      REM   ... 14 rows

      REM   CREATE TABLE "SCOTT"."SALGRADE" ("GRADE" NUMBER, "LOSAL" NUMBER,

      REM   "HISAL" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255

      REM   STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE

      REM   "USERS" LOGGING NOCOMPRESS ;

      REM   ... 5 rows

      …………

      把前面的REM去了,再去掉最后一行,創建表的DDL就OK了。

      方法二:

      set pagesize 0

      set long 90000

      set feedback off

      set echo off

      spool get_allddl.sql

      connect USERNAME/PASSWORD@SID;

      SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)

      FROM USER_TABLES u;

      SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)

      FROM USER_INDEXES u;

      spool off;

      My Test:

      set pagesize 0

      set long 90000

      set feedback off

      set echo off

      spool get_allddl.sql

      connect username/password@database;

      SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)

      FROM USER_TABLES u where table_name = 'USER_INFO';

      spool off;

      SET HEADING OFF;

      SET ECHO OFF;

      SET LONG 90000;

      SPOOL D:\test.txt

      SELECT dbms_metadata.get_ddl('TABLE','USER_INFO') FROM SYS.DBA_USERS WHERE USERNAME = 'GINGKO';

      SPOOL OFF;

    posted @ 2013-12-25 16:16 一堣而安 閱讀(2615) | 評論 (0)編輯 收藏

    oracle在導入時指定不導入某張表

    原文:http://www.itpub.net/forum.php?mod=viewthread&tid=1762028

    1. 先手動重建表結構,因為這張表不需要導入,表結構可以隨表寫,目的是使表名存在:
    create table table_name (x int); --table_name為不需要導入的表。

    2. 導入的時候加參數ignore=n

    quote:
    ignore參數
    Oracle在恢復數據的過程中,當恢復某個表時,該表已經存在,就要根據ignore參數的設置來決定如何操作。
    若ignore=y,Oracle不執行CREATE TABLE語句,直接將數據插入到表中,如果插入的記錄違背了約束條件,比如主鍵約束,則出錯的記錄不會插入,但合法的記錄會添加到表中。
    若ignore=n,Oracle不執行CREATE TABLE語句,同時也不會將數據插入到表中,而是忽略該表的錯誤,繼續恢復下一個表。


    3. 全部導入完之后,刪除該表即可。


    說明:一般情況下,不需要導入某張表,是因為這張表數據量龐大,但是沒有導入需求。所以可以使用以上方法導入。如果表很小,導入也無妨。

    posted @ 2013-12-16 11:11 一堣而安 閱讀(1174) | 評論 (0)編輯 收藏

    手動重建em資料庫

    1, 刪除建立失敗的em檔案庫:

    C:\Documents and Settings\Administrator>emca -deconfig dbcontrol db -repos drop

    EMCA 開始于 2011-4-23 11:19:18

    EM Configuration Assistant, 11.1.0.5.0 正式版

    版權所有 (c) 2003, 2005, Oracle。保留所有權利。

    輸入以下信息:

    數據庫 SID: verafzy

    監聽程序端口號: 1521

    SYS 用戶的口令:

    SYSMAN 用戶的口令:

    SYSMAN 用戶的口令:

    是否繼續? [是(Y)/否(N)]: y

    2009-7-23 11:19:40 oracle.sysman.emcp.EMConfig perform

    信息: 正在將此操作記錄到 E:\app\Administrator\cfgtoollogs\emca\verafzy\emca_2011-4-23 _11_19_17.log。

    2011-4-23 11:19:42 oracle.sysman.emcp.util.DBControlUtil stopOMS

    信息: 正在停止 Database Control (此操作可能需要一段時間)...

    2011-4-23 11:20:23 oracle.sysman.emcp.EMReposConfig invoke

    信息: 正在刪除 EM 資料檔案庫 (此操作可能需要一段時間)...

    2011-4-23 11:24:42 oracle.sysman.emcp.EMReposConfig invoke

    信息: 已成功刪除資料檔案庫

    已成功完成 Enterprise Manager 的配置

    EMCA 結束于 2011-4-23 11:24:56

    2, 重新創建em檔案庫:

    C:\Documents and Settings\Administrator>emca -config dbcontrol db -repos create

    EMCA 開始于 2011-4-23 11:26:55

    EM Configuration Assistant, 11.1.0.5.0 正式版

    版權所有 (c) 2003, 2005, Oracle。保留所有權利。

    輸入以下信息:

    數據庫 SID: verafzy

    監聽程序端口號: 1521

    SYS 用戶的口令:

    DBSNMP 用戶的口令:

    SYSMAN 用戶的口令:

    SYSMAN 用戶的口令: 通知的電子郵件地址 (可選):

    通知的發件 (SMTP) 服務器 (可選):

    -----------------------------------------------------------------

    已指定以下設置

    數據庫 ORACLE_HOME ................ E:\app\Administrator\product\11.1.0\db_1

    本地主機名 ................ PC-200901030636

    監聽程序端口號 ................ 1521

    數據庫 SID ................ verafzy

    通知的電子郵件地址 ...............

    通知的發件 (SMTP) 服務器 ...............

    是否繼續? [是(Y)/否(N)]: y

    posted @ 2013-12-12 20:08 一堣而安 閱讀(291) | 評論 (0)編輯 收藏

    用JS清除緩存(document.cookie)

    (轉)此文為轉載,實在不好意思,原文地址丟了沒有附上。

    function foreach() {
     var strCookie = document.cookie;
     var arrCookie = strCookie.split("; "); // 將多cookie切割為多個名/值對
     for ( var i = 0; i < arrCookie.length; i++) { // 遍歷cookie數組,處理每個cookie對
      var arr = arrCookie[i].split("=");
      if (arr.length > 0)
       DelCookie(arr[0]);
     }

    }
    function GetCooki(offset)
    {
     var endstr = document.cookie.indexOf(";", offset);
     if (endstr == -1)
      endstr = document.cookie.length;
     return decodeURIComponent(document.cookie.substring(offset, endstr));
    }
    function DelCookie(name) {
     var exp = new Date();
     exp.setTime(exp.getTime() - 1);
     var cval = GetCookie(name);
     document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString()+"; path=/"; //不斷的嘗試曾經使用過的path值
    }

    function GetCookie(name) {
     var arg = name + "=";
     var alen = arg.length;
     var clen = document.cookie.length;
     var i = 0;
     while (i < clen) {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
       return GetCooki(j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
       break;
     }
     return null;
    }

    另外推薦2個文章:

    http://blog.sina.com.cn/s/blog_537cdd2e0100pxcz.html

    http://www.mzone.cc/article/363.html


     

    posted @ 2013-12-11 14:34 一堣而安 閱讀(990) | 評論 (0)編輯 收藏

    復選框文字對齊顯示

    最近的工作中,有很多表單的制作,很多次都碰到復選框與文字對齊的問題,發現在不同的瀏覽器中,顯示各異,顯示效果如下

    觀察發現,IE6、IE7 顯示效果基本相同,算是顯示比較正常的效果,IE8、safari 和火狐顯示效果基本相同,兩個文字都偏下,而opera稍偏下。在之前我的解決方法,都是通過文字外面套上另外的標簽,等,通過調整input標簽和label的html標簽來對齊,大概方法即是讓input 和label 標簽都左浮動,但前提一定是在寫頁面的時候,文字外面加了label 標簽,這種方法應為定義了大量的浮動,還需要清除浮動,才能保證下面頁面的正常顯示,或者有些人用相對定位等方法,如果文字外面沒有套label標簽,更沒有其他標簽呢?經過查找,發現其實還是有很簡單的方法就能解決問題

    方法一:如果將font-family中的第一個字體設置為Tahoma,則可以實現對齊(Verdana等字體也可以)。次方法來源與 藍色理想 http://www.blueidea.com/tech/web/2009/6910_3.asp

     

     

    如果文字外面有label 標簽,只要定義input,label {vertical-align:middle} 即可,

    注意:因為單選框或是復選框有外邊距,所以需要先去除掉他的外邊距。

    方法二: 定義input 標簽vertical-align  屬性,調整input 的上下邊距,來實現input和文字的水平對齊

    .admin_more  input{vertical-align: text-bottom; margin-bottom:2px; *margin-bottom:-2px;}

    原文:

    http://blog.csdn.net/lifen_zhang/article/details/5415768

    posted @ 2013-12-08 21:48 一堣而安 閱讀(180) | 評論 (0)編輯 收藏

    僅列出標題
    共17頁: First 上一頁 3 4 5 6 7 8 9 10 11 下一頁 Last 

    導航

    統計

    常用鏈接

    留言簿(1)

    隨筆分類

    隨筆檔案

    收藏夾

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲另类视频在线观看| 99久久精品国产亚洲| 亚洲av无码成人精品国产| 免费一本色道久久一区| 亚洲13又紧又嫩又水多| 18禁成年无码免费网站无遮挡 | 99久久久国产精品免费牛牛四川 | 亚洲天堂在线视频| 中文在线观看国语高清免费| 亚洲人成77777在线播放网站| 在线观看免费播放av片| 亚洲美免无码中文字幕在线| 精品国产sm捆绑最大网免费站 | 亚洲美女视频一区二区三区| 2021国内精品久久久久精免费| avtt天堂网手机版亚洲| 日韩在线免费电影| jzzjzz免费观看大片免费| 精品亚洲永久免费精品| ww4545四虎永久免费地址| 亚洲成aⅴ人片久青草影院按摩| 哒哒哒免费视频观看在线www| 一级特黄a大片免费| 亚洲天天在线日亚洲洲精| 毛片免费在线播放| 男人j进女人p免费视频| 亚洲AV无码欧洲AV无码网站| 在线永久免费的视频草莓| WWW亚洲色大成网络.COM| 国产美女亚洲精品久久久综合| 啦啦啦完整版免费视频在线观看 | 国产91成人精品亚洲精品| 亚洲色成人中文字幕网站| 1024免费福利永久观看网站| 国产成人精品久久亚洲高清不卡| 久久精品国产亚洲沈樵| 女人18毛片水真多免费播放| 一级做a爰片久久毛片免费看| 中文字幕亚洲免费无线观看日本| 免费无码又爽又高潮视频| 两个人看的www高清免费视频|