1

I was creating a website using html5 with django.I know that when action attribute is null in form it refers to the same url.So I tried it.But I cannot submit my action.So I used "#",instead of null in action attribute it worked.So I am confused about the two values in the attribute.So Can anybody tell me what is the difference between action="" and action="#" in html form tag

Anuj K.C.
  • 478
  • 3
  • 10
  • 25
  • have a look into this thread: http://stackoverflow.com/questions/1131781/is-it-a-good-practice-to-use-an-empty-url-for-a-html-forms-action-attribute-a – anuragal Jan 24 '14 at 07:51

1 Answers1

1

action="" will resolve to the page's address. action="#" will resolve to the page's address + #, which will mean an empty fragment identifier.

please check what do <form action="#"> and <form method="post" action="#> do?

Community
  • 1
  • 1
Pranay Bhardwaj
  • 1,059
  • 8
  • 9