S
S
SwitchFeed2020-12-31 15:29:06
Django
SwitchFeed, 2020-12-31 15:29:06

How to check if the submit key was pressed?

I need to check if a button of type submit is pressed to clear a data table. How to do it

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-12-31
@bacon

This action is on the client, has nothing to do with django, it will be checked by javascript

D
Dimonchik, 2020-12-31
@dimonchik2013

javascript

document.getElementById('button').onclick = function() {
   alert("Fuck'you, Spielberg");
}​;​

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question