TypeError: document.formname.submit is not a function
<form name="formname" ...>
....
<input name="submit" type="submit" class="dd" value="统计" />
<input name="button1" type="button" class="buttonBg" onclick="aaa(1)" value="按仓库统计报表" />
</form>
<script type="text/javascript">
function aaa(value){
//alert(value);
if(value == 1){
document.formname.action = '/login.htm';
document.formname.submit();
}
}
</script>
TypeError: document.echartForm.submit is not a function
这里提交的时候,出现了:
TypeError: document.formname.submit is not a function
解决:
Javascript Error: submit is not a function
有时候需要用javascript提交表单,这个时候我们会用javascript:document.formname.submit();可是我在这样做的时候怎么也提交不成功,报出javascript错误Javascript Error: submit is not a function。百思不得其解,后来查阅资料才发现,在用 document.formname.submit();提交表单的时候,表单里面不能有name="submit"的元素,否则在提交的时候,该对象会和submit();方法发生混淆造成该错误!! 切记,切记!
TypeError: document.formname.submit is not a function的更多相关文章
- js提交表单错误:document.form.submit() is not a function
今天在写JS时,遇上这么个错误:"document.form.submit() is not a function",经过一番搜索,最终找到了修复方法. 这个错误一般是由于表单&l ...
- document.getElementById("searchForm").submit is not a function
document.getElementById("searchForm").submit is not a function在用userForm.submit() 提交表单的时候, ...
- 【jQuery 区别】.click()和$(document).on("click","指定的元素",function(){});的区别
给出以下的代码展示: //绑定 下一页 的点击事件 $("a[aria-label='Next']").click(function(){ $("a[aria-label ...
- Uncaught TypeError: _react2.default.findDOMNode is not a function
react 查找某节点时报错 Uncaught TypeError: _react2.default.findDOMNode is not a function 代码: import React, { ...
- ie8下$(document).on('mouseover mouseout','ul li',function(){})的bug
$(document).on('mouseover mouseout','ul li',function(){ if (event.type == 'mouseover') { c ...
- Error: theForm.submit is not a function !!
theForm.submit is not a function 调试了半天,才发现范了低级错误. 页面中有一个按钮ID 是 submit 而引发的错误. 引出的问题是页面上的元素命名范围不能是 wi ...
- 关于submit与document.form1.submit();这2个提交的区别
首先要知道 一个是按钮提交 一个是在js函数里写代码 document.form1.submit() 提交 区别如下: 从使的方式及效主要有二点区别吧.一.使用submit()提交时,表单中不能存在s ...
- TypeError:_12.store.query is not a function
1.错误描述 TypeError:_12.store.query is not a function _SearchMixin.js(第62行 ...
- 异常---ment.getElementById("searchForm").submit is not a function
今天在写代码的时候JS一直报上面这个错.搞了半天一直想不明白 .我看别的页面都是这样写了就是没有一点错.. 可能是写了一个晚上的代码..头有点晕..后来终于找到原因了..浪费我两个小时啊..杯具.. ...
随机推荐
- MyEclipse修改项目名称后,部署到 tomcat问题
问题描述: 修改项目名称后,部署到tomcat问题 解决方案: 项目->属性->myelcipse->web下,修 改web context root就可! 要在eclipse里面改 ...
- while练习:输入一个班级的人数,然后依次输入学员成绩,计算班级学员的平均成绩和总成绩。
Console.WriteLine("请输入班级的总人数:"); int count = int.Parse(Console.ReadLine()); ;//声明一个循环变量来记录 ...
- Laravel教程 三:视图变量传递和Blade
Laravel教程 三:视图变量传递和Blade 此文章为原创文章,未经同意,禁止转载. Blade 上一篇我们简单地说了Router,Views和Controllers的工作流程,这一次我就按照上一 ...
- ios 图片尺寸
- ubuntu12.04配置静态IP及设置DNS
静态IP配置方法: 编辑/etc/network/interfaces,删掉内容,并输入以下几行(假设你的网卡是eth0) sudo gedit /etc/network/interfaces aut ...
- Hibernate unsaved-value 属性
Session的saveOrUpdate方法是由Hibernate来判断被操作对象究竟是一个持久化对象还是临时自由状态对象.这需要在对象映射文件的主键id中定义unsaved-value属性,如果不显 ...
- Xcode6中添加pch全局引用文件
前沿:xcode6中去掉了pch,为了一些琐碎的头文件引用,加快了 编译速度! xcode6添加pch文件方法 1. 右键Supporting File,选择“New File” 2. 选择Other ...
- hdu1114 Piggy-Bank (DP基础 完全背包)
链接:Piggy-Bank 大意:已知一只猪存钱罐空的时候的重量.现在的重量,已知若干种钱的重量和价值,猪里面装着若干钱若干份,求猪中的钱的价值最小值. 题解: DP,完全背包. g[j]表示组成重量 ...
- CSS包含块containing block详解
“包含块(containing block)”,W3c中一个很重要的概念,今天带大家一起来好好研究下. 初步理解 在 CSS2.1 中,很多框的定位和尺寸的计算,都取决于一个矩形的边界,这个矩形,被称 ...
- 淘宝(阿里百川)手机客户端开发日记第七篇 Service,Handler和Thread
现在我们已经已经知道android有Service,Handler和Thread这些内容了,但是我想应该还有很多人对此并不是很清楚他们之间的区别! (1)Service 是运行在后端的程序,不与UI直 ...