Web Analytics Made Easy -
StatCounter submit button as image - CodingForum

Announcement

Collapse
No announcement yet.

submit button as image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • submit button as image

    i have a submit button with the following code.
    <input type="submit" name="btnadd" value="Add">

    However, now i want to use an image as a button. How am i going to code it?

  • #2
    add this to your <head>:
    Code:
    <script language="javascript">
    function submitForm() {
    document.formName.submit();
    }
    (Replace formName with the name of the form)

    now call the function with a <a> tag:
    Code:
    <a href="javascript:submitForm()"><img src="pic.gif" bordor="0"></a>
    replace "pic.gif with the image you want to use.
    Last edited by cdn lover; Feb 11, 2004, 07:40 PM.

    Comment


    • #3
      No need to use javascript...



      <input type="image" src="image.gif" name="submit" value="submit">
      ~Designer's Toolz~

      Comment

      Working...
      X