Добавить js/forma.md
This commit is contained in:
10
js/forma.md
Normal file
10
js/forma.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Работа с формой
|
||||
|
||||
|
||||
```js
|
||||
|
||||
const select = tr.querySelector("td.select_status").firstElementChild // нахдим TD где находится список
|
||||
const textToFind = 0001 // Элемнт котоый нужно найти в списке у выбрать его
|
||||
select.selectedIndex = [...select.options].findIndex(option => option.value === textToFind); // Поиск по value
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user