The case :

案子 :

<form  id='frm' name ='frm' action='test.php'>
 <div style='display:none'>
 <input type='text' name='name' value ='' />
 </div>
 <input type='submit' value='Submit' />
</form>

For example , How can i submit the from given above with its inputs ? Issue : The "name" input wont be passed !

例如,我如何提交上面给出的输入?问题:“名称”输入不会传递!

5 个解决方案

#1


6

Programatically, you can just trigger the submit event on the form element:

以编程方式,您可以在表单元素上触发submit事件:

$('#frm').submit();

Edit: Actually, after reading your markup more carefully, you are using an input named name, this element can cause "clashing" problems with the form's name attribute.

编辑:实际上,在仔细阅读标记后,您使用的是名为name的输入,此元素可能会导致窗体的name属性出现“冲突”问题。

Consider changing the name of your input.

请考虑更改输入的名称。

See also:

也可以看看:

  • Unsafe Names for HTML Form Controls
  • HTML表单控件的不安全名称

更多相关文章

  1. 提交一个表单(后台生成id),点击保存并一步后切换到下一个tab中,此t
  2. 如何打开名称中包含特殊字符的文件
  3. 使用mysql验证在php中登录表单
  4. 如何在Laravel 5表单请求中使用请求路由参数?
  5. 防止Ajax创建表单的默认值
  6. 在PHP和MySQL中同时插入来自多个表单的多个值
  7. 如何在发送之前更改SOAP请求中的名称空间前缀(皇家邮件 - 发送请
  8. 如何使用PHP在表单中找到移动复制
  9. 如果我对名称中方括号的输入使用jQuery serialize(),为什么会出现

随机推荐

  1. 小鹿周末总结
  2. 图文分析:Python语言的惊人成长之路
  3. 福布斯系列之补充数据收集 | Python数据
  4. 动画:面试如何轻松手写链表?
  5. 刚接触编程我入过的坑(强烈建议初学者好好
  6. 面试必知必会|理解C++虚函数
  7. 白话布隆过滤器BloomFilter
  8. 福布斯系列之数据清洗(2) | Python数据分析
  9. PyCharm:2017.3版即将新增科学计算模式,预
  10. Python内置OS模块用法详解