[HTML5] Element id binding

When you give an element an id attr, it will automaticlly create a object with the same name of id:

<form id="theform" action="/" method="post">
  <label for="message">Message:</label><br />
  <textarea name="message">!</textarea><br />
  <input type="submit" />
</form>

<script>
  theform.submit();
</script>

猜你喜欢

转载自www.cnblogs.com/Answer1215/p/12359829.html