JavaScript DOM Button 对象 formEnctype 属性

  • Button 对象 formEnctype 属性

    formEnctype属性设置或返回按钮的formenctype属性的值。formenctype属性指定在将表单数据发送到服务器之前应如何对其进行编码。此属性会覆盖表单的enctype属性。formenctype属性仅用于type=“submit”的按钮。
    注意: formenctype属性对于HTML5中的<button>元素是新的。
    返回在将表单数据发送到服务器之前应对其进行编码的方式:
    var x = document.getElementById("myBtn").formEnctype;
    尝试一下
  • 浏览器支持