method

image_button

v1_8_6_287 - Show latest stable - Class: CGI::HtmlExtension
image_button(src = "", name = nil, alt = nil)
public

Generate an Image Button Input element as a string.

src is the URL of the image to use for the button. name is the input name. alt is the alternative text for the image.

Alternatively, the attributes can be specified as a hash.

  image_button("url")
    # <INPUT TYPE="image" SRC="url">

  image_button("url", "name", "string")
    # <INPUT TYPE="image" SRC="url" NAME="name" ALT="string">

  image_button("SRC" => "url", "ATL" => "strng")
    # <INPUT TYPE="image" SRC="url" ALT="string">