smartFocus

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-11 15:13:03

软件介绍

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

本文地址:https://codercto.com/soft/d/23153.html

计算机网络

计算机网络

Andrew S. Tanenbaum / 潘爱民 / 清华大学出版社 / 2004-8-1 / 60.00元

《计算机网络(第4版)》全书按照网络协议模型(物理层、数据链路层、介质访问控制子层、网络层、传输层和应用层),自下而上系统地介绍了计算机网络的基本原理,并给出了大量实例。在讲述各网络层的同时,还融合进了近年来迅速发展起来的各种网络技术,如Internet、SONET、A DSL、CDMA、WLAN和蓝牙等。另外,针对当前计算机网络的发展现状以及计算机安全的重要性,本书用了一整章的篇幅对计算机安全进......一起来看看 《计算机网络》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

随机密码生成器
随机密码生成器

多种字符组合密码