jQuery插件EnPlaceholder实现输入框提示文字_jquery

WBOY
Release: 2016-05-16 15:56:32
Original
1628 people have browsed it

用法:

首先在head中分别引入jQuery及本插件

  

通过value方式模拟placeholder

$('#form1 input,#form1 textarea').placeholder();

在不支持placeholder的浏览器下,通过插入悬浮的span元素方式模拟

文本框内容改变时placeholder消失:

$('#username2,#password').placeholder({isUseSpan:true});

获得焦点时placeholder消失:

$('#address2').placeholder({isUseSpan:true,onInput:false});

Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!