A
A
artshelom2017-03-08 21:47:49
JavaScript
artshelom, 2017-03-08 21:47:49

How to send a variable to a function?

How to send a variable to a function?

function putDayBall(l) {
        alert(l);
}
<label onclick="putDayBall('D')">D</label>

If I write function putDayBall(var l) - then idea writes that there is an error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2017-03-08
@artshelom

What is the problem?
https://jsfiddle.net/qfjatfut/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question