zl程序教程

您现在的位置是:首页 >  前端

当前栏目

[HTML5] Element id binding

html5 ID Element Binding
2023-09-14 09:00:48 时间

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>