Jump to content
gongpex

Create submit button using tag <a>

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

There is no point in using an <a> element as a submit button. You can already style a submit button to look like whatever you want.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...