6

Add Behavior with JavaScript

Introduction

It’s perfectly fine to have a web page consisting of nothing but HTML markup and CSS, but if you want interactivity, you need JavaScript.

With JavaScript, you can apply a little, for example, posting a form to a backend, to a lot, like building a Single-Page Application (SPA) with a framework like Vue.js or React.js. Regardless, there’s a common denominator, namely that you need to write code and reference that code or code file from your HTML markup.

You will see that Copilot can help with both common tasks like adding a script tag to your HTML markup to more advanced tasks like adding a JavaScript framework like Vue.js to your web app.

In this chapter, we will:

  • Generate JavaScript using prompts ...

Get AI-Assisted Programming for Web and Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.