abstract:<!DOCTYPE html> <html> <head> <title>jquery的基础语法</title> <script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.
<!DOCTYPE html> <html> <head> <title>jquery的基础语法</title> <script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function(){ $('button').click(function(){ if($('div').hide() = true){ $('div').show(); } else { $('div').hide(); } }) }) </script> <div style="width: 100px; height: 100px; background-color: pink"></div> <button>点击</button> </body> </html>
Correcting teacher:天蓬老师Correction time:2019-01-01 09:11:55
Teacher's summary:$('div').hide() = true, 其实不用写后面的: = true, 也是可以的