Problem with form buttons in IE

I have buttons on a page that looks like this:

<p>
    <a href="view.php">
      <input type="button" name="view" value="View Database" />
    </a>
</p>

IE does not support these buttons or multiple buttons. I'm not sure which one. Does anyone know how to fix this to work with IE?

+3
source share
5 answers

What exactly are you trying to achieve? If you want the custom button to redirect to view.php, you can useonclick:

<input type="button" name="view" value="View Database" onclick="window.location.href='view.php';" />

or something similar.

+1
source

<a> , . , , <input> script onclick css, -ish ( display: block display: );

+3

, . URL- , :

<form action="view.php">

    <input type="submit" name="view" value="View Database" />

</form>

javascript, . , , javascript.

+3
<input type="button" 
onclick="javascript:document.location='view.php';" 
value="View Database"/>
+1

:

<input  type="button" name="view" value="View Database" onclick="javascript:window.location='view.php'"/> 
+1

Source: https://habr.com/ru/post/1739161/


All Articles