F
F
frees22018-05-10 17:42:49
JavaScript
frees2, 2018-05-10 17:42:49

Why is Firefox throwing an error on event.target.id?

Why the new Firefox throws an error on event.target.id
Other browsers work flawlessly.
<a id="3434567" onclick=" load()"> ссылка </a>

function load() {
  var tar = event.target.id;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2018-05-10
@Sanasol

<a id="3434567" onclick="load"> ссылка </a>

function load(event) {
  var tar = event.target.id;

where can he get the event?

P
pi314, 2014-06-10
@nepster-web

As the great Cat Matroskin bequeathed: in order to trim something unnecessary, you first need to choose something unnecessary. Thus, if you do not choose what is not needed, then you will not have to trim anything. That's why they are regular expressions...
I admit that it's hard to believe, but the ban on learning and writing regular expressions has long been lifted! Today, regular expressions are quite realistic not only to write, but also to check with your own hands, for example here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question