ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
jQuery简单模型: ~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery model</title> <style> .box1{border: 1px #000 solid;width: 200px;} .box2{border: 1px #000 solid;width: 200px;} .change{background: blue;} </style> </head> <body> <div class="box1">123</div><br/> <div class="box2">456</div> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script> $('.box2').hover(function(){ //目标,行为 $('.box1').toggleClass('change'); //事件(目标,行为) }); </script> </body> </html> ~~~