Jump to content

Create submit button using tag <a>


gongpex
 Share

Recommended Posts

Hello everyone, Please read this simple code :

<form name="" action="" method="post"><input type="submit" value="submit" /> //or<button>SUBMIT</button></form>

Usually people using <input > tag to create "SUBMIT" button or using <button></button> to create it, like on above. Q : If I using tag : <a href=""></a> can I create submit button ? Please answer Thanks

Link to comment
Share on other sites

Without a form, what would be the target of such a button? You might get more of what you need from javascript in this case.

Link to comment
Share on other sites

Without a form
I didn't said without form, just if <input> or button change to <a> I ask this question because this tag won't work on IE6 :
<a href="/../"><input type="button" value="cancel" /></a>

I can use

<input type="image" src="" />

but I should create image for it, But alright this okay . Thanks for answer

Link to comment
Share on other sites

anchor tag (<a>) can submit a form only if you're using javascript, I suggest you're using jQuery. CSS is only give you a display, not a function

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...