开发者

html form using input as a submit button

A web site I've been using has some interesting behavior... There is a form, but there is no button for submission. Instead, there is an input:

<input id="ctl00_pageContent_loginButton" typ开发者_StackOverflowe="image"
  style="border-width: 0px;" alt="Login" src="images/btn_login.gif"
  name="ctl00$pageContent$loginButton"/>

and when you hover over it the cursor turns into a hand, like an anchor tag -- however I do not see any css (in firebug) showing that the input should have a hover attribute. Further, the input does not have any sign of being an actual link/submission button. I'm stumped -- would love to know how they were able to do this.

The web page is: https://my.sa.ucsb.edu/gold/Login.aspx

Thank you!


See http://webdesign.about.com/od/htmltags/p/bltags_inputimg.htm

input elements of type image submit the form that they are a part of. They also send the co-ordinates of where the user clicked.

Image input fields are used for graphic inputs including multi-function maps, etc


They didn't do anything special... that's the defaut behaivor of a submit button with type="image". In order to see this closer, you can create an empty HTML document with just an <input type="image" src="somthing.gif"> and you will see it has the same behaivor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜