实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>4.jquery的基本语法</title> </head> <body> <script type="text/javascript" src="../js/jquery-3.3.1.js"></script> <script type="text/javascript"> $('h2 span').css('color','red') $('p+p').html('终于找到你了,开工吧') // $('<img src="../images/zly.jpg" width="150">') $('<img src="../images/zly.jpg" width="150">').insertAfter('h2').css('border-radius','50%') </script> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例