F
F
Ferret Common2018-02-13 08:49:20
JavaScript
Ferret Common, 2018-02-13 08:49:20

Change the file to which the link will throw me (in html) from the script. Is that possible?

I need that when the condition is met (for example, if ( document.getElementById('pass').value = "123") {
...
}
In place of three dots there should be a code that changes the end address of the link. Please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2018-02-13
@XOPEK_32

if ( document.getElementById('pass').value = "123" ) {
  document.getElementById('link').href = "https://whatever.com" 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question