Please tell me why javascript may not work in Firefox if mandatory in my opinion is present
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The script is such and it is characteristic that it is very simple.
function myFunc(elem1, elem2, elem3) { elem1.style.display = 'block'; elem2.style.display = 'none'; elem3.style.display = 'none'; }
called as follows
onclick = "myFunc(e1, e2, e3);"
What does he need XD)
Put the code ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <script> function myFunc(elem1, elem2, elem3) { elem1.style.display = 'block'; elem2.style.display = 'none'; elem3.style.display = 'none'; } </script> </head> <body> <div id="e3">Previous</div> <input onclick="myFunc(e1, e2, e3)" type="submit" id="send" value="getE1" /> <input onclick="myFunc(e2, e1, e3)" type="submit" id="send" value="getE2" /> <div id="e1" style="display:none;">e1</div> <div id="e2" style="display:none;">e2</div> </body> </html>