在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:learn-co-students/js-jquery-modify-html-readme-bootcamp-prep-000开源软件地址:https://github.com/learn-co-students/js-jquery-modify-html-readme-bootcamp-prep-000开源编程语言:HTML 100.0%开源软件介绍:Modify HTML With jQueryObjectives
Inline jQueryWe're going to use jQuery to add some text to our HTML page. Include jQuery LinkThis lesson doesn't render as a lab, but there are files within this repository you'll need to code along. Click on the GitHub icon in Learn, and fork and clone this repository into your IDE. In order to start writing jQuery, we need to include the library in our HTML. One way to do this would be to download a copy of the jQuery library and include it with our project. We can also link to the library hosted by a content delivery network, or CDN. For this example, we'll be loading jQuery from Google's CDN. Copy the code below and paste it in <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> Adding TextGo ahead and open We want to add the text Below our <script>
</script> Between these tags is where we want to write our inline jQuery. The script tags need to be at the bottom of the page because the code we're going to write is dependent on the And now, in between the script tags, add the following code: $("#yo").append("hey hey hey hey!!!!!"); Save the changes to The
Don't worry too much about the mechanics of these selectors and functions, we'll go over those in way more detail. Just notice that the text appeared on the screen, even though we didn't explicitly add it between the View Modify HTML With jQuery on Learn.co and start learning to code for free. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论