Problem while Merging Image with Button
Guys check this out : http://w开发者_如何学Goww.codetoad.com/html/buttons/image_submit_button.asp
You'll notice then when you click the button it is taking you to
http://www.codetoad.com/html/buttons/image_submit_button.asp?x=118&y=22
How do i remove this "x=118&y=22" at the end.Because my form is a get form and because of this its altering my code..
Please help
That's the standard behaviour of <input type="image" />
elements and I don't think you can change it.
You could instead use the <button>
tag:
<button type="submit">
<img src="someimage.jpg" />
</button>
Edit: If you don't want it to look like a button, you can use CSS to remove the button styling:
button {
border-style: none;
background-color: transparent;
}
I think this is the behaviour and insead of fighting with this behaviour what you can do is apply css on input type=submit. with background-image property.
< input type=submit id='submitButton' value='submit' />
<style> #submitButton { width: 100px; height: 55px; padding: 55px 0 0; margin: 0; border: 0; background: transparent url(pathtoyourimage/image.gif) no-repeat center top; overflow: hidden; cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ } </style>
精彩评论