Jquery工作常用实例——隐藏功能实现
生活随笔
收集整理的這篇文章主要介紹了
Jquery工作常用实例——隐藏功能实现
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
隱藏功能的實現:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script type="text/javascript" src="jquery-1.6.1.js"></script>
<script type="text/javascript">
??? $(document).ready(function(){
??? ??? $("#button1").click(function(){
??? ??? ??? $(this).hide();
??? ??? })
??? ???
??? ??? $("p").click(function(){
??? ??? ??? $(this).hide();
??? ??? })
??? })
</script>
<title>Jquery hide</title>
</head>
<body>
<p>If you click me,I'll disappear!</p>
<input type="button" id="button1"? value="Click me"/>
</body>
</html>
如上,引入Jquery庫后,單擊Click me,該按紐即將隱藏;單擊“If you click me,I'll disappear!”段落中的隨便一個字,該段落將隱藏。
轉載于:https://my.oschina.net/adamboy/blog/28089
總結
以上是生活随笔為你收集整理的Jquery工作常用实例——隐藏功能实现的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 两台xenserver 同一个vlan中
- 下一篇: varnish搭建