实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js">
5
</script>
6
<script>
7
$(document).ready(function(){
8
  $("input").focus(function(){
9
    $("span").css("display","inline").fadeOut(2000);
10
  });
11
});
12
</script>
13
<style>
14
span
15
{
16
display:none;
17
}
18
</style>
19
</head>
20
<body>
21
22
<input>
23
<span>Can I have you phone number?</span>
24
<p>Click in the input field to get focus.</p>
25
26
</body>
27
</html>