replace
This commit is contained in:
parent
e2443e8de6
commit
75e30539ef
73 changed files with 195 additions and 195 deletions
|
@ -13,7 +13,7 @@ There's a `<select>`:
|
|||
</select>
|
||||
```
|
||||
|
||||
Use Javascript to:
|
||||
Use JavaScript to:
|
||||
|
||||
1. Show the value and the text of the selected option.
|
||||
2. Add an option: `<option value="classic">Classic</option>`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
1. On click -- replace `innerHTML` of the cell by `<textarea>` with same sizes and no border. Can use Javascript or CSS to set the right size.
|
||||
1. On click -- replace `innerHTML` of the cell by `<textarea>` with same sizes and no border. Can use JavaScript or CSS to set the right size.
|
||||
2. Set `textarea.value` to `td.innerHTML`.
|
||||
3. Focus on the textarea.
|
||||
4. Show buttons OK/CANCEL under the cell, handle clicks on them.
|
||||
|
|
|
@ -50,7 +50,7 @@ Your email please: <input type="email" id="input">
|
|||
</script>
|
||||
```
|
||||
|
||||
Modern HTML allows to do many validations using input attributes: `required`, `pattern` and so on. And sometimes they are just what we need. Javascript can be used when we want more flexibility. Also we could automatically send the changed value on the server if it's correct.
|
||||
Modern HTML allows to do many validations using input attributes: `required`, `pattern` and so on. And sometimes they are just what we need. JavaScript can be used when we want more flexibility. Also we could automatically send the changed value on the server if it's correct.
|
||||
|
||||
|
||||
## Methods focus/blur
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Form submission: event and method submit
|
||||
|
||||
The `submit` event triggers when the form is submitted, it is usually used to validate the form before sending it to the server or to abort the submission and process it in Javascript.
|
||||
The `submit` event triggers when the form is submitted, it is usually used to validate the form before sending it to the server or to abort the submission and process it in JavaScript.
|
||||
|
||||
The method `form.submit()` allows to initiate form sending from JavaScript. We can use it to dynamically create and send our own forms to server.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue