Добавить js/event.md
This commit is contained in:
9
js/event.md
Normal file
9
js/event.md
Normal file
@@ -0,0 +1,9 @@
|
||||
### Добавить событие и параметры к функции
|
||||
|
||||
Передаем параметр tel. Если надо event, добавляем в самой функции 2 параметр - он будет event
|
||||
```js
|
||||
tel.addEventListener('click',dcoder.bind(null, tel))
|
||||
|
||||
function dcoder(tel){}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user