1. /*
  2. * Copyright (c) 2000 World Wide Web Consortium,
  3. * (Massachusetts Institute of Technology, Institut National de
  4. * Recherche en Informatique et en Automatique, Keio University). All
  5. * Rights Reserved. This program is distributed under the W3C's Software
  6. * Intellectual Property License. This program is distributed in the
  7. * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  8. * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  9. * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  10. * details.
  11. */
  12. package org.w3c.dom.html;
  13. /**
  14. * The <code>FORM</code> element encompasses behavior similar to a collection
  15. * and an element. It provides direct access to the contained input elements
  16. * as well as the attributes of the form element. See the FORM element
  17. * definition in HTML 4.0.
  18. * <p>See also the <a href='http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510'>Document Object Model (DOM) Level 2 Specification</a>.
  19. */
  20. public interface HTMLFormElement extends HTMLElement {
  21. /**
  22. * Returns a collection of all control elements in the form.
  23. */
  24. public HTMLCollection getElements();
  25. /**
  26. * The number of form controls in the form.
  27. */
  28. public int getLength();
  29. /**
  30. * Names the form.
  31. */
  32. public String getName();
  33. public void setName(String name);
  34. /**
  35. * List of character sets supported by the server. See the
  36. * accept-charset attribute definition in HTML 4.0.
  37. */
  38. public String getAcceptCharset();
  39. public void setAcceptCharset(String acceptCharset);
  40. /**
  41. * Server-side form handler. See the action attribute definition in HTML
  42. * 4.0.
  43. */
  44. public String getAction();
  45. public void setAction(String action);
  46. /**
  47. * The content type of the submitted form, generally
  48. * "application/x-www-form-urlencoded". See the enctype attribute
  49. * definition in HTML 4.0.
  50. */
  51. public String getEnctype();
  52. public void setEnctype(String enctype);
  53. /**
  54. * HTTP method used to submit form. See the method attribute definition
  55. * in HTML 4.0.
  56. */
  57. public String getMethod();
  58. public void setMethod(String method);
  59. /**
  60. * Frame to render the resource in. See the target attribute definition
  61. * in HTML 4.0.
  62. */
  63. public String getTarget();
  64. public void setTarget(String target);
  65. /**
  66. * Submits the form. It performs the same action as a submit button.
  67. */
  68. public void submit();
  69. /**
  70. * Restores a form element's default values. It performs the same action
  71. * as a reset button.
  72. */
  73. public void reset();
  74. }