zoukankan      html  css  js  c++  java
  • jQuery 常用代码

     

    文本框,清空默认值 当焦点移到input时去掉当前值,离开还原当前值

     

     

    在IE下隐藏超链接

    点击button时,input 可以。 点击或获取焦点input时,在下边出现一个input type="text" 框。

    <script type="text/javascript">
        $(document).ready(function(){  
            $('#mydiv').hide();
            $('#name')
               .focus(function(){  
                    $('#mydiv').show();
                })
                .blur(function(){  
                    $('#mydiv').show();
                });
          $('#enterInput')
                .click(function(){
    			//  name.removeAttr("disabled");
                      name.attr('disabled',false);
                })  
        });
    </script>
      </head>
      <body>
         <table>
         	<tr>
         		<td>
         		 <input type="text" id="name" name="name" disabled="disabled"><span><input type="button" id="enterInput"  value="手输"></span>
         		</td>
         	</tr>
    	     	<tr id="mydiv">
    	     		<td>
    	     		 <input type="text"  >
    	     		</td>
    	     	</tr>
         </table>
      </body>


  • 相关阅读:
    css 面试学习
    关于CSS的图像放大问题的解决,需要借助jQuery等直接用css3设置
    DEBUG使用
    crontab
    od
    dumpe2fs
    mke2fs
    dd
    GDB
    rm
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218398.html
Copyright © 2011-2022 走看看