Button 的类型和默认值

以前做表单的按钮使用这两个元素:

普通按钮:<input type="button">
提交按钮:<input type="submit">

后来为了改成这两个元素:

普通按钮:<button>
提交按钮:<button type="submit">

今天发现<button><button type="submit"> 是一样的,都是提交按钮,囧

而与 <input type="button"> 对应的是<button type="button">

最后发现是不同浏览器的对 <button> 的默认行为有不同的定义,所以你应该总是显式的声明 type,又一个例子,证明写清楚点总是好的,不要去记浏览器们的差别在哪里。

更多

在 Macbook 上跨平台编译 Gogs 以解决官方二进制包需要更高版本 glibc 而无法在 Anolis OS 8 上运行的问题

背景 几年前在阿里云上通过官方二进制包自托管了一套 gogs ,但是一直没有升级过。这次想一步到位升级到最新版本,却发现官方二进制包依赖更高版本的 glibc 而无法在 Anolis OS 8 上运行,最终计划通过源码编译一个二进制包来适配当前的服务器环境。 服务器环境 ##### root@AnolisOS8 ####### -------------- ##O#O## OS: Anolis OS release 8.9 x86_64 ####### Host: Alibaba Cloud ECS pc-i440fx-2.1 ########### Kernel: 4.18.0-553.40.1.0.1.an8.x86_64 ############# Uptime: 1 day, 23 hours, 40

By 熊立丁
用 Aria2 & AriaNg 搭建离线下载平台

用 Aria2 & AriaNg 搭建离线下载平台

环境 硬件:Mac Mini 2014 4C4G 操作系统:Debian 12 IP地址:192.168.2.2 流程 1. 切换到管理员权限 su root 2. 安装 aria2 apt install aria2 3. 以服务的形式运行 aria2 aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all --enable-rpc 启动 rpc 服务 --rpc-listen-all=true 允许从任意 IP 访问 --rpc-allow-origin-all 允许浏览器跨域访问 4. 配置 nginx 增加站点用于放置前端界面

By 熊立丁
浙ICP备15043004号-1