<a href="register.php"><img src="img/register.jpg" width="262" height="98" /></a> 

I did it like this. But how to use it to send data when pressed. I want analog:

 <input type="submit" /> 
  • one
    You can assign an id to the button, and apply css to this id, just do not forget to null the border: 0px; and background: none; then specify your (redefine). - Gena Ant
  • one
    Once again, you do not need perversions, create a form, give the button an id, and assign id to this id, put an image from the img tag on the background, set the width and height of the button and that's it! In the form handler, specify register.php - Gena Ant
  • I did this: <style type = "text / css" media = "screen"> (sharp) button {background-image: url (img / register.jpg); } </ style> <div id = "button"> <input type = "submit" name = "submit" id = /> </ div> NOTHING = | - navi1893
  • one
    Remove the button, and id to assign input'u. - Gena Ant
  • one
    advise you everything correctly, here's an example even jsfiddle.net/nEyAc - Yakovlev Andrei

2 answers 2


form_id-link to your form you want to send (done through a DOM search)

  • and on php it is impossible? It seems js yes and that is a link to your form ??? I did not understand it - navi1893
  • This is js and that's what you need. form_id=document.getElementById('your_form_id') or document.forms.your_form_name - KaZac
 <form action="register.php"> <button type="submit" style="background: url('img/register.jpg'); height: 98px; width: 262px;" /> </form>