Property 'submit' of object #<HTMLFormElement> is not a function
<form action="" type="get" id="form">
<input type="button" name="submit" id="subBtn" value="submit">
</form>
点击按钮,触发表单提交:
document.getElementById("subBtn").onclick=function(){
document.getElementById("form").submit();
}
会报错(chrome下):
Uncaught TypeError: Property 'submit' of object #<HTMLFormElement> is not a function
原因是name="submit"这句,换成别的name=sb1,sb2,sb2。。。
另外,经测,将id="submit",也会这样
同理,用于reset
一句话!!:
在表单里,别用name="submit|reset" 或 id="submit|reset"
ps:今天遇到了此错误,纠结了半天,记录一下,以警醒。
Property 'submit' of object #<HTMLFormElement> is not a function的更多相关文章
- 2.mongoDB add user in v3.0 问题的解决(Property 'addUser' of object admin is not a func)
问题:创建mongodb帐户时,出错 > db.addUser('jyu', 'aerohive') 2015-08-05T20:03:02.767+0800 E QUERY TypeE ...
- Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' ...
- Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法
发现问题 运行一下以前的一个Vue+webpack的 vue仿新闻网站 小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncau ...
- [one day one question] webpack 打包报错 Cannot assign to read only property 'exports' of object '#<Object>'
问题描述: webpack 打包报错 Cannot assign to read only property 'exports' of object '#<Object>',这怎么破? 解 ...
- Vue 使用自定义组件时报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
自己试做了一下vue的插件 参考element-ui: 写了一个组件 import message from './packages/message/index.js'; const install ...
- Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' 点开错误的文 ...
- vue运行报错error:Cannot assign to read only property 'exports' of object '#<Object>'
用weex做项目的时候,npm start 之后一直报错error:Cannot assign to read only property 'exports' of object '#<Obje ...
- 在Vue中使用i18n 国际化遇到 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
最近用Vue在搭建前端框架,在引用i18n时,运行的时候报错:Uncaught TypeError: Cannot assign to read only property 'exports' of ...
- Cannot assign to read only property 'exports' of object '#<Object>' ,文件名大小写问题!!!
有些坑不知道怎么就掉进去,可能一辈子都爬不起来!!! 一.错误描述 昨天还好好的,今天早上来从git获取了一下别人提交的代码就出错了!而提交代码的人 运行一点错误都没有!!! cya@KQ-101 M ...
随机推荐
- HTML---初识HTML
版权声明:本文为博主原创文章.不经博主同意注明链接就可以转载. https://blog.csdn.net/Senior_lee/article/details/33723573 H ...
- Struts,Spring,Hibernate优缺点
Struts跟Tomcat.Turbine等诸 多Apache项目一样,是开源软件,这是它的一大优点.使开发者能更深入的了解其内部实现机制. Struts开放源码框架的创建是为了使开发者在构建基于Ja ...
- JS中手动触发事件的方法
如果大家将一张网页看成一个form的话,大致上就成了一个web form的模型.在win form 下要想手动触发某一个对象的事件是很简单的,只要发送一条消息即可达成.(PostMessage) 但是 ...
- AbstractQueuedSynchronizer,Lock,Synchronized
Lock和Synchronized的区别 Lock实现了与synchronized相同的互斥性和内存可见性. synchronized代码简单,并且与处理异常操作实现了很好的交互. synchroni ...
- CentOS 7 开放端口
因为CentOS升级到7之后,发现无法使用iptables控制Linuxs的端口,因为CentOS 7使用firewalld代替了原来的iptables.下面记录如何使用firewalld开放Linu ...
- soapUI-DataSource
1.1.1.1 概述 - 数据源 Option Description Properties DataSource属性表 Toolbar DataSource工具栏 Configura ...
- 使用Sed和Awk实现批量文件的文本替换
摘要: 使用 Sed 完成文本替换操作任务是非常合适的.结合 find 命令,即可实现指定批量文件的文本替换.同时给出了Awk的解决方案作为对比. 问题 现在, 我要将一个原有Java项目中的一些包及 ...
- Python笔记 #13# Pandas: Viewing Data
感觉很详细:数据分析:pandas 基础 import pandas as pd import numpy as np import matplotlib.pyplot as plt dates = ...
- Django:提交表单时遇到403错误:CSRF verification failed
Django:提交表单时遇到403错误:CSRF verification failed 问题: 提交表单时遇到403错误:CSRF verification failed 解决方案: 在表单界面ht ...
- Java8 Lambda
Demo: package com.qhong; public class Main { public static void main(String[] args) throws Exception ...