A
A
Alexander2017-11-01 21:27:17
css
Alexander, 2017-11-01 21:27:17

How to change an attribute?

There is an input with type="button", it is necessary that after the end of the check, the type is equal to "submit"

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Daniil Maslov, 2019-08-07
@WebN00b

WebGL Fluid Simulation
How to make such an animation?

A
Alexander, 2017-11-01
@AleksandrB

In general, I figured it out, I used setAttribute(). Who needs it, google about it

S
Sergey, 2017-11-01
@initrd0

<INPUT type="button" id="someButton"/>
if(/*какая-то проверка*/){
document.getElementById("someButton").type = 'submit';
}

However, this is not very normal .. it's better to initialize submit first, and cancel the action via e.preventDefault();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question