Skip to main content
inclui novas informações
Fonte Link
hugocsl
  • 66,9mil
  • 17
  • 88
  • 166

Tente dessa forma, no hrefhref vc chama a função

href="javascript:document.getElementById('formID').submit();"

<form action="/teste.php" method="get" id="formID">

        <map name="image-map">
            <area target="" alt="" title="" coords="210,233,541,508" shape="rect" href="javascript:document.getElementById('formID').submit();">
        </map>
    
        <div>
            <font face="verdana" color="white">Player: </font>
            <input type="text" name="nome_player" maxlength="15"><br>
        </div>
    
        <div>
            <img src="http://unsplash.it/600/600" alt="circulo_" class="circulo" usemap="#image-map"/>
        </div>
    
    </form>


Outra forma de fazer sem o href fazendo um onClick="myform.submit();"

<form name="myform" action="/teste.php" method="post>
    ... campos do form ....
    <area onClick="myform.submit();" nohref target="" alt="" title="" coords="210,233,541,508" shape="rect">
</form>

Tente dessa forma, no href vc chama a função

href="javascript:document.getElementById('formID').submit();"

<form action="/teste.php" method="get" id="formID">

        <map name="image-map">
            <area target="" alt="" title="" coords="210,233,541,508" shape="rect" href="javascript:document.getElementById('formID').submit();">
        </map>
    
        <div>
            <font face="verdana" color="white">Player: </font>
            <input type="text" name="nome_player" maxlength="15"><br>
        </div>
    
        <div>
            <img src="http://unsplash.it/600/600" alt="circulo_" class="circulo" usemap="#image-map"/>
        </div>
    
    </form>

Tente dessa forma, no href vc chama a função

href="javascript:document.getElementById('formID').submit();"

<form action="/teste.php" method="get" id="formID">

        <map name="image-map">
            <area target="" alt="" title="" coords="210,233,541,508" shape="rect" href="javascript:document.getElementById('formID').submit();">
        </map>
    
        <div>
            <font face="verdana" color="white">Player: </font>
            <input type="text" name="nome_player" maxlength="15"><br>
        </div>
    
        <div>
            <img src="http://unsplash.it/600/600" alt="circulo_" class="circulo" usemap="#image-map"/>
        </div>
    
    </form>


Outra forma de fazer sem o href fazendo um onClick="myform.submit();"

<form name="myform" action="/teste.php" method="post>
    ... campos do form ....
    <area onClick="myform.submit();" nohref target="" alt="" title="" coords="210,233,541,508" shape="rect">
</form>
Fonte Link
hugocsl
  • 66,9mil
  • 17
  • 88
  • 166

Tente dessa forma, no href vc chama a função

href="javascript:document.getElementById('formID').submit();"

<form action="/teste.php" method="get" id="formID">

        <map name="image-map">
            <area target="" alt="" title="" coords="210,233,541,508" shape="rect" href="javascript:document.getElementById('formID').submit();">
        </map>
    
        <div>
            <font face="verdana" color="white">Player: </font>
            <input type="text" name="nome_player" maxlength="15"><br>
        </div>
    
        <div>
            <img src="http://unsplash.it/600/600" alt="circulo_" class="circulo" usemap="#image-map"/>
        </div>
    
    </form>