您现在的位置是: 首页 > 前端开发 layUI点击按钮页面刷新问题解决方案
layUI点击按钮页面刷新问题解决方案
2020-05-20 【前端开发】 1711人已围观 2670次浏览
简介layUI点击按钮页面刷新问题解决方案
在layUI中,默认的button按钮是没有type属性的,也就是在W3C标准浏览器中(比如Google和Firefox)需要特别注意
没有 type="button" 属性的情况下,默认是会提交表单的,也就是出现整个页面刷新的问题根源
在layUI中,按照官方文档来使用,当然是没有问题。但是如果你在表单中自定义了一些事件想通过点击button触发,这时候就一定要加上 type="button" 属性
<button type="button" class="layui-btn">点击</button>
或者是不用button标签,改为input标签
<input class="layui-btn">点击</input>
很赞哦! (0)
点击排行
- Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR DISABLE You can't write or read against a disable instance
- RocketMQ 出现 sendDefaultImpl call timeout 问题
- Debian apt 使用国内镜像
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- SpringBoot @NotBlank 不生效问题
- 记一次 Mybatis-Plus 自动填充无效问题解决
- nuxt 项目完整部署方案
- SpringBoot 2.x 文件上传出现 The field file exceeds its maximum permitted size of 1048576 bytes
站长推荐
猜你喜欢
- Python自动生成和安装requirements.txt文件中的依赖
- Linux 查看磁盘、磁盘分区、挂载磁盘、卸载磁盘操作
- Debian/Ubuntu无netstat命令解决方案
- Nestedset 出现 Node must exists. 错误解决方案
- 优化 Mac 上 office 软件更新慢的问题
- CentOS 安装Node.js
- CentOS 安装JDK
- Android SDK版本号与API级别的对照表
- SpringBoot 启动测试时出现提示 Test class should have exactly one public zero-argument constructor
- mac idea spring boot 启动慢