fix(curriculum): update code blocks to use correct language (#59245)

This commit is contained in:
Clarence
2025-03-12 10:23:58 +01:00
committed by GitHub
parent 753a39b2d4
commit 171ba131bd
2 changed files with 4 additions and 4 deletions
@@ -65,7 +65,7 @@ button.addEventListener('click',(event) => {
- **Definition**: There are three ways a form can be submitted. The first is when the user clicks a button in the form which has the `type` attribute set to `submit`. The second is when the user presses the `Enter` key on any editable `input` field in the form. The third is through a JavaScript call to the `requestSubmit()` or `submit()` methods of the `form` element.
- **`action` Attribute**: The `action` attribute should contain either a URL or a relative path for the current domain. This value determines where the form attempts to send data - if you do not set an `action` attribute, the form will send data to the current page's URL.
```js
```html
<form action="https://freecodecamp.org">
<input
type="text"
@@ -79,7 +79,7 @@ button.addEventListener('click',(event) => {
- **`method` Attribute**: This attribute accepts a standard `HTTP` method, such as `GET` or `POST`, and uses that method when making the request to the action URL. When a method is not set, the form will default to a `GET` request. The data in the form will be URL encoded as `name=value` pairs and appended to the action URL as query parameters.
```js
```html
<form action="/data" method="POST">
<input
type="text"
@@ -2100,7 +2100,7 @@ button.addEventListener('click',(event) => {
- **Definition**: There are three ways a form can be submitted. The first is when the user clicks a button in the form which has the `type` attribute set to `submit`. The second is when the user presses the `Enter` key on any editable `input` field in the form. The third is through a JavaScript call to the `requestSubmit()` or `submit()` methods of the `form` element.
- **`action` Attribute**: The `action` attribute should contain either a URL or a relative path for the current domain. This value determines where the form attempts to send data - if you do not set an `action` attribute, the form will send data to the current page's URL.
```js
```html
<form action="https://freecodecamp.org">
<input
type="text"
@@ -2114,7 +2114,7 @@ button.addEventListener('click',(event) => {
- **`method` Attribute**: This attribute accepts a standard `HTTP` method, such as `GET` or `POST`, and uses that method when making the request to the action URL. When a method is not set, the form will default to a `GET` request. The data in the form will be URL encoded as `name=value` pairs and appended to the action URL as query parameters.
```js
```html
<form action="/data" method="POST">
<input
type="text"