当前位置:网站首页>[larave]关于laravel使用form submit()不能获取值问题
[larave]关于laravel使用form submit()不能获取值问题
2022-08-04 21:33:00 【51CTO】
首先,可以确定Request是有值的
![[larave]关于laravel使用form submit()不能获取值问题_Request](/img/c1/21bb94081de8a889f6295cf7ee4ab5.png)
但是Controller没有值
![[larave]关于laravel使用form submit()不能获取值问题_回车键_02](/img/2e/e24767398124addb6acf87a98b7e56.png)
form提交只是从click()改成submit()
![[larave]关于laravel使用form submit()不能获取值问题_回车键_03](/img/14/ff3658e1b2cb3f3d5277b2539d113c.png)
'
![[larave]关于laravel使用form submit()不能获取值问题_input标签_04](/img/76/b22cd0c3a737569baab451000a1508.png)
因为我不想使用button提交表单,因为要禁止在input标签里按回车键会提交(不想禁用回车键事件)
因此转用submit()
一直以为是vue提交表单的问题,直到尝试了laravel的另外一种获得Request值的办法:
这是可以获得值的
但是这样:
就是null的
看来submit()方法就是没有进入到formData这一层
然后需求又导致新的问题,现在可以提交了,但是使用
即使加了prevent
也是会执行form表格的跳转,而不是Controller的跳转
![[larave]关于laravel使用form submit()不能获取值问题_input标签_05](/img/2f/a7a17b1497390509edd6d096e8e473.png)
最后通过只能通过禁止回车键来实现
![[larave]关于laravel使用form submit()不能获取值问题_Request_06](/img/3c/adc70dfa5b5ea4552229560753eb63.png)
边栏推荐
- 数字重塑客观世界,全空间GIS发展正当其时
- Ramnit感染型病毒分析与处置
- 立方度量(Cubic Metric)
- ES6高级-Promise的用法
- Win11如何开启Telnet客户端?
- Data warehouse (1) What is data warehouse and what are the characteristics of data warehouse
- MySQL查询为啥慢了?
- Pinduoduo open platform order information query interface [pdd.order.basic.list.get order basic information list query interface (according to transaction time)] code docking tutorial
- PCBA scheme design - kitchen voice scale chip scheme
- buu web
猜你喜欢

用Tesseract开发一个你自己的文字识别应用

y87.第五章 分布式链路追踪系统 -- 分布式链路追踪系统起源(一)

驱动点云格式修改带来的效率提升

JdbcTemplate概述和测试

立即升级!WPS Office 出现 0day 高危安全漏洞:可完全接管系统,官方推出紧急更新

88. (the home of cesium) cesium polymerization figure

PRIMAL: Pathfinding via Reinforcement and Imitation Multi-Agent Learning 代码解析

AXI interface application of Zynq Fpga image processing - the use of axi_lite interface

国际项目管理师PMP证书,值得考嘛?

【PCBA program design】Grip dynamometer program
随机推荐
OD-Model [6]: YOLOv2
LayaBox---TypeScript---结构
PowerCLi batch configuration of NTP
[Teach you to use the serial port idle interrupt of the STM32HAL library]
dotnet delete read-only files
win10 uwp 使用 WinDbg 调试
Altium Designer 19.1.18 - draw polygons copper hollow out, for the cursor just capture solutions
多个平台显示IP属地,必须大力推行互联网实名制
[2022 Hangzhou Electric Power Multi-School 5 1012 Questions Buy Figurines] Application of STL
Altium Designer 19.1.18 - 保护锁定的对象
Chapter7 : Network-Driven Drug Discovery
【uiautomation】微信好友列表获取(存储到txt中)
C language knowledge (1) - overview of C language, data types
如何为Web3.0世界启动完美的DAO
Axure9基本交互操作(一)
Data warehouse (1) What is data warehouse and what are the characteristics of data warehouse
如何将二叉搜索树转化为一个有序的双向链表(原树上修改)
Configure laravel queue method using fort app manager
【SQL之降龙十八掌】01——亢龙有悔:入门10题
dotnet 使用 lz4net 压缩 Stream 或文件