smartFocus
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/smartFocus
软件介绍
A small plugin to inject a text into inputs ortextareas as a label.
The text is removed when the element is focused and re-injected onblur if the element is leaved blank.
Here is the code to include in an external js or to paste on the page:
jQuery.fn.smartFocus = function(text) {
$(this).val(text).focus(function(){
if($(this).val() == text){
$(this).val('');
}
}).blur(function(){
if( $(this).val() == '' ){
$(this).val(text);
}
});
};
USAGE EXAMPLE:
var mail = '* E-mail';
$('#mail').smartFocus(mail);
This will inject the text "* E-mail" into the element (an input or a textarea) with id='mail'
Grab
编程珠玑(第二版)
[美] Jon Bentley / 谢君英、石朝江 / 中国电力出版社 / 2004-4 / 28.00元
《编程珠玑(第2版)》是计算机科学方面的经典名著。书的内容围绕程序设计人员面对的一系列实际问题展开。作者Jon Bentley 以其独有的洞察力和创造力,引导读者理解这些问题并学会解决方法,而这些正是程序员实际编程生涯中至关重要的。一起来看看 《编程珠玑(第二版)》 这本书的介绍吧!
