最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

jquery实现提示语淡入效果实例教程

来源:动视网 责编:小OO 时间:2020-11-27 20:06:29
文档

jquery实现提示语淡入效果实例教程

效果图。话不多说,请看代码。<;<。DOCTYPE html PUBLIC ";-//W3C//DTD XHTML 1.0 Transitional//EN";";http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>;<;html xmlns=";http://www.w3.org/1999/xhtml";>;<;head>;<;title>;jquery 提示语淡入<;/title>;<;meta http-equiv=";Content-Type";content=";text/html;)。
推荐度:
导读效果图。话不多说,请看代码。<;<。DOCTYPE html PUBLIC ";-//W3C//DTD XHTML 1.0 Transitional//EN";";http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>;<;html xmlns=";http://www.w3.org/1999/xhtml";>;<;head>;<;title>;jquery 提示语淡入<;/title>;<;meta http-equiv=";Content-Type";content=";text/html;)。
 本文主要介绍了jquery实现提示语淡入效果的实例,具有很好的参考价值。下面跟着小编一起来看下吧,希望能帮助到大家。

效果图:

话不多说,请看代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> jquery 提示语淡入</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="" />
<style type="text/css">
.tishi-com{display:none;width:65px;height:20px;line-height:20px; background:#fff9c9; border:1px solid #c7bf93; color:#666;
position:relative;left:230px;top:-22px;}
</style>
<script type="text/javascript" src="jquery-3.0.0.js"></script>
</head>
<body>
 <p style="width:500px;height:200px;border:1px solid #E5E5E5;margin:0 auto;">
 <p style="height:50px;width:100%;">
 <label class="user-label">用户名:</label>
 <input type="text" class="username" name="username"/>
 <p class="tishi-com">
 <span class="tishi-font font-12"></span>
 </p>
 </p>
 <p style="height:50px;width:100%;">
 <label class="user-label">手机号:</label>
 <input type="text" class="phone" name="phone"/>
 <p class="tishi-com">
 <span class="tishi-font font-12"></span>
 </p> 
 </p>
 <p>
 <input type="submit" class="fade" value="提交" />
 </p>
 </p>
<script type="text/javascript">
 $(document).ready(function(){
 $(".fade").click(function(){
 var name=$.trim($(".username").val());
 var phone=$.trim($(".phone").val());
 if(name==""){
 $('input[name=username]').siblings('.tishi-com').fadeIn();
 $('input[name=username]').siblings('.tishi-com').find('.tishi-font').text('不能为空');
 }
 if(phone==""){
 $('input[name=phone]').siblings('.tishi-com').fadeIn();
 $('input[name=phone]').siblings('.tishi-com').find('.tishi-font').text('不能为空');
 }
 });
 });
</script>
</body>
</html>

文档

jquery实现提示语淡入效果实例教程

效果图。话不多说,请看代码。<;<。DOCTYPE html PUBLIC ";-//W3C//DTD XHTML 1.0 Transitional//EN";";http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>;<;html xmlns=";http://www.w3.org/1999/xhtml";>;<;head>;<;title>;jquery 提示语淡入<;/title>;<;meta http-equiv=";Content-Type";content=";text/html;)。
推荐度:
标签: 效果 实例 淡入
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top