类似于style.css里面这样一段话是点进去就切换到日文输入法的平假名
ime-mode:inactive;
 font-family:'MS ゴシック';
 font-size:12pt;
 text-align:left;
 vertical-align:baseline;
 padding-top:1px;半角片假名该怎么做

解决方案 »

  1.   

    我也知道阿
    怎么个写法啊
    ime-mode一共就4个属性
      

  2.   

    或者你在KEYDOWN和KEYUP中写脚本,片假名也有ASCII呀,你检查ASCII吧,以前做全角半角就是这么做的
      

  3.   

    *
     * isHalf(strValue)
     * 半角文字をチェックする
    */function isHalf(strValue)
    {
        strValue=trim(strValue);
        if(strValue == "") return true;
        for(var i=0;i<strValue.length;i++)
        {
            if(strValue.charCodeAt(i) > 126) return false;
        }
        return true;}/* * isFull(strValue) * 全角文字をチェックする
    */function isFull(strValue)
    {
        strValue = trim(strValue);
        for (i=0; i < strValue.length; i++)
        {
            var chaz09 = strValue.substring(i, i + 1);
            if ((chaz09 >= ' ' && chaz09 <= '~' )|| isHalfKatakana(chaz09))
            {
                return false ;
            }
        }
        return true;
    }/*
     * isNumber(strNumber)
     * 半角数値をチェックする
    */
    function isNumber( strNumber )
    {
        strNumber = trim(strNumber);
        for (i=0; i < strNumber.length; i++)
        {
            var c = strNumber.substring(i, i + 1);
            if (!b_isDigit(c))
            {
                return false;
            }
        }
        return true;
    }