Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1376292
  • 博文数量: 205
  • 博客积分: 6732
  • 博客等级: 准将
  • 技术积分: 2835
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-04 17:59
文章分类

全部博文(205)

文章存档

2016年(1)

2015年(10)

2014年(1)

2013年(39)

2012年(23)

2011年(27)

2010年(21)

2009年(55)

2008年(28)

我的朋友

分类: 系统运维

2009-11-11 23:38:23

 当鼠标点种文本框时,切换输入法
  style="ime-mode:auto"  
  style="ime-mode:active"   //禁止输入全角字符就好了
  style="ime-mode:inactive"  
  style="ime-mode:disabled"   
    
//获取网页路径,parentElement

    <script language="JavaScript" type="text/javascript">
        var hrefs = self.location.toString();
        var temp = hrefs.substring(0,hrefs.lastIndexOf('/'));
        temp = temp.substring(0,temp.length);
        temp = temp.substring(temp.lastIndexOf('/')+1,temp.length);
        switch(temp)
        {
            case 'requirement' :
                var td1 = document.getElementById("astyle1");
                if(td1)
                {
                    td1.style.fontSize = '11pt';
                    td1.style.color = 'blue';
                    td1.parentElement.bgColor = '#CFE7FF';
                }
                break;
            case 'ofr' :
                var td2 = document.getElementById("astyle2");
                if(td2)
                {
                    td2.style.fontSize = '11pt';
                    td2.style.color = 'blue';
                    td2.parentElement.bgColor = '#CFE7FF';
                }                
                break;
            case 'pricing' :
                var td3 = document.getElementById("astyle3");
                if(td3)
                {
                    td3.style.fontSize = '11pt';
                    td3.style.color = 'blue';
                    td3.parentElement.bgColor = '#CFE7FF';
                }
                break;
            case 'ofrtest' :
                var td4 = document.getElementById("astyle4");
                if(td4)
                {
                    td4.style.fontSize = '11pt';
                    td4.style.color = 'blue';
                    td4.parentElement.bgColor = '#CFE7FF';
                }
                break;
            case 'publish' :
                var td5 = document.getElementById("astyle5");
                if(td5)
                {
                    td5.style.fontSize = '11pt';
                    td5.style.color = 'blue';
                    td5.parentElement.bgColor = '#CFE7FF';
                }
                break;                                            
        }
    </script>


阅读(7268) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~